ShootingPropagationSettings.java

  1. /* Copyright 2022-2025 Romain Serra
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.control.indirect.shooting.propagation;

  18. import org.orekit.annotation.DefaultDataContext;
  19. import org.orekit.attitudes.AttitudeProvider;
  20. import org.orekit.attitudes.AttitudeProviderModifier;
  21. import org.orekit.attitudes.FrameAlignedProvider;
  22. import org.orekit.forces.ForceModel;
  23. import org.orekit.frames.Frame;
  24. import org.orekit.frames.FramesFactory;

  25. import java.util.List;

  26. /**
  27.  * Defines propagation settings for indirect shooting methods.
  28.  * The provided list of {@link ForceModel} should have their counterpart in the provided adjoint equations encapsulated in {@link AdjointDynamicsProvider}.
  29.  * Note that in case of orbit-based propagation (with a central body), the Newtonian term still needs to be passed explicitly (with its adjoint equivalent).
  30.  *
  31.  * @author Romain Serra
  32.  * @since 12.2
  33.  * @see org.orekit.propagation.numerical.NumericalPropagator
  34.  * @see org.orekit.propagation.numerical.FieldNumericalPropagator
  35.  */
  36. public class ShootingPropagationSettings {

  37.     /** Force models. */
  38.     private final List<ForceModel> forceModels;

  39.     /** Adjoint dynamics. */
  40.     private final AdjointDynamicsProvider adjointDynamicsProvider;

  41.     /** Attitude provider. */
  42.     private final AttitudeProvider attitudeProvider;

  43.     /** Propagation frame. */
  44.     private final Frame propagationFrame;

  45.     /** Integration settings. */
  46.     private final ShootingIntegrationSettings integrationSettings;

  47.     /**
  48.      * Simple constructor with default frame and attitude provider.
  49.      * @param forceModels forces for numerical propagation
  50.      * @param adjointDynamicsProvider adjoint derivatives provider
  51.      * @param integrationSettings integration settings
  52.      */
  53.     @DefaultDataContext
  54.     public ShootingPropagationSettings(final List<ForceModel> forceModels,
  55.                                        final AdjointDynamicsProvider adjointDynamicsProvider,
  56.                                        final ShootingIntegrationSettings integrationSettings) {
  57.         this(forceModels, adjointDynamicsProvider, FramesFactory.getGCRF(), integrationSettings,
  58.             AttitudeProviderModifier.getFrozenAttitudeProvider(new FrameAlignedProvider(FramesFactory.getGCRF())));
  59.     }

  60.     /**
  61.      * Constructor.
  62.      * @param forceModels forces for numerical propagation
  63.      * @param propagationFrame frame used as reference frame in equations of motion by integrator
  64.      * @param adjointDynamicsProvider adjoint derivatives provider
  65.      * @param integrationSettings integration settings
  66.      * @param attitudeProvider attitude provider
  67.      */
  68.     public ShootingPropagationSettings(final List<ForceModel> forceModels,
  69.                                        final AdjointDynamicsProvider adjointDynamicsProvider,
  70.                                        final Frame propagationFrame,
  71.                                        final ShootingIntegrationSettings integrationSettings,
  72.                                        final AttitudeProvider attitudeProvider) {
  73.         this.forceModels = forceModels;
  74.         this.adjointDynamicsProvider = adjointDynamicsProvider;
  75.         this.propagationFrame = propagationFrame;
  76.         this.integrationSettings = integrationSettings;
  77.         this.attitudeProvider = attitudeProvider;
  78.     }

  79.     /**
  80.      * Getter for adjoint dynamics provider.
  81.      * @return adjoint dynamics
  82.      */
  83.     public AdjointDynamicsProvider getAdjointDynamicsProvider() {
  84.         return adjointDynamicsProvider;
  85.     }

  86.     /**
  87.      * Getter for the force models.
  88.      * @return forces
  89.      */
  90.     public List<ForceModel> getForceModels() {
  91.         return forceModels;
  92.     }

  93.     /**
  94.      * Getter for the attitude provider.
  95.      * @return attitude provider.
  96.      */
  97.     public AttitudeProvider getAttitudeProvider() {
  98.         return attitudeProvider;
  99.     }

  100.     /**
  101.      * Getter for the propagation frame.
  102.      * @return propagation frame
  103.      */
  104.     public Frame getPropagationFrame() {
  105.         return propagationFrame;
  106.     }

  107.     /**
  108.      * Getter for the integration settings.
  109.      * @return integration settings
  110.      */
  111.     public ShootingIntegrationSettings getIntegrationSettings() {
  112.         return integrationSettings;
  113.     }
  114. }