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
19 import org.orekit.annotation.DefaultDataContext;
20 import org.orekit.attitudes.AttitudeProvider;
21 import org.orekit.attitudes.AttitudeProviderModifier;
22 import org.orekit.attitudes.FrameAlignedProvider;
23 import org.orekit.forces.ForceModel;
24 import org.orekit.frames.Frame;
25 import org.orekit.frames.FramesFactory;
26
27 import java.util.List;
28
29 /**
30 * Defines propagation settings for indirect shooting methods.
31 * The provided list of {@link ForceModel} should have their counterpart in the provided adjoint equations encapsulated in {@link AdjointDynamicsProvider}.
32 * 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).
33 *
34 * @author Romain Serra
35 * @since 12.2
36 * @see org.orekit.propagation.numerical.NumericalPropagator
37 * @see org.orekit.propagation.numerical.FieldNumericalPropagator
38 */
39 public class ShootingPropagationSettings {
40
41 /** Force models. */
42 private final List<ForceModel> forceModels;
43
44 /** Adjoint dynamics. */
45 private final AdjointDynamicsProvider adjointDynamicsProvider;
46
47 /** Attitude provider. */
48 private final AttitudeProvider attitudeProvider;
49
50 /** Propagation frame. */
51 private final Frame propagationFrame;
52
53 /** Integration settings. */
54 private final ShootingIntegrationSettings integrationSettings;
55
56 /**
57 * Simple constructor with default frame and attitude provider.
58 * @param forceModels forces for numerical propagation
59 * @param adjointDynamicsProvider adjoint derivatives provider
60 * @param integrationSettings integration settings
61 */
62 @DefaultDataContext
63 public ShootingPropagationSettings(final List<ForceModel> forceModels,
64 final AdjointDynamicsProvider adjointDynamicsProvider,
65 final ShootingIntegrationSettings integrationSettings) {
66 this(forceModels, adjointDynamicsProvider, FramesFactory.getGCRF(), integrationSettings,
67 AttitudeProviderModifier.getFrozenAttitudeProvider(new FrameAlignedProvider(FramesFactory.getGCRF())));
68 }
69
70 /**
71 * Constructor.
72 * @param forceModels forces for numerical propagation
73 * @param propagationFrame frame used as reference frame in equations of motion by integrator
74 * @param adjointDynamicsProvider adjoint derivatives provider
75 * @param integrationSettings integration settings
76 * @param attitudeProvider attitude provider
77 */
78 public ShootingPropagationSettings(final List<ForceModel> forceModels,
79 final AdjointDynamicsProvider adjointDynamicsProvider,
80 final Frame propagationFrame,
81 final ShootingIntegrationSettings integrationSettings,
82 final AttitudeProvider attitudeProvider) {
83 this.forceModels = forceModels;
84 this.adjointDynamicsProvider = adjointDynamicsProvider;
85 this.propagationFrame = propagationFrame;
86 this.integrationSettings = integrationSettings;
87 this.attitudeProvider = attitudeProvider;
88 }
89
90 /**
91 * Getter for adjoint dynamics provider.
92 * @return adjoint dynamics
93 */
94 public AdjointDynamicsProvider getAdjointDynamicsProvider() {
95 return adjointDynamicsProvider;
96 }
97
98 /**
99 * Getter for the force models.
100 * @return forces
101 */
102 public List<ForceModel> getForceModels() {
103 return forceModels;
104 }
105
106 /**
107 * Getter for the attitude provider.
108 * @return attitude provider.
109 */
110 public AttitudeProvider getAttitudeProvider() {
111 return attitudeProvider;
112 }
113
114 /**
115 * Getter for the propagation frame.
116 * @return propagation frame
117 */
118 public Frame getPropagationFrame() {
119 return propagationFrame;
120 }
121
122 /**
123 * Getter for the integration settings.
124 * @return integration settings
125 */
126 public ShootingIntegrationSettings getIntegrationSettings() {
127 return integrationSettings;
128 }
129 }