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;
18
19 import org.orekit.control.indirect.shooting.propagation.ShootingPropagationSettings;
20 import org.orekit.propagation.SpacecraftState;
21
22 /**
23 * Data container for two-point boundary output of indirect shooting methods.
24 *
25 * @author Romain Serra
26 * @since 12.2
27 * @see AbstractIndirectShooting
28 */
29 public class ShootingBoundaryOutput {
30
31 /** Initial propagation state. */
32 private final SpacecraftState initialState;
33
34 /** Terminal propagation state. */
35 private final SpacecraftState terminalState;
36
37 /** Propagation settings. */
38 private final ShootingPropagationSettings shootingPropagationSettings;
39
40 /** Convergence flag. */
41 private final boolean converged;
42
43 /** Iteration count. */
44 private final int iterationCount;
45
46 /**
47 * Constructor.
48 * @param converged convergence flag
49 * @param iterationCount iteration number
50 * @param initialState initial state
51 * @param terminalState terminal state
52 * @param shootingPropagationSettings propagation settings
53 */
54 public ShootingBoundaryOutput(final boolean converged, final int iterationCount,
55 final SpacecraftState initialState,
56 final ShootingPropagationSettings shootingPropagationSettings,
57 final SpacecraftState terminalState) {
58 this.converged = converged;
59 this.iterationCount = iterationCount;
60 this.initialState = initialState;
61 this.terminalState = terminalState;
62 this.shootingPropagationSettings = shootingPropagationSettings;
63 }
64
65 /**
66 * Getter for convergence flag.
67 * @return convergence flag
68 */
69 public boolean isConverged() {
70 return converged;
71 }
72
73 /**
74 * Getter for the iteration number.
75 * @return count
76 */
77 public int getIterationCount() {
78 return iterationCount;
79 }
80
81 /**
82 * Getter for the initial state.
83 * @return initial state
84 */
85 public SpacecraftState getInitialState() {
86 return initialState;
87 }
88
89 /**
90 * Getter for the terminal state.
91 * @return terminal state
92 */
93 public SpacecraftState getTerminalState() {
94 return terminalState;
95 }
96
97 /**
98 * Getter for the shooting propagation settings.
99 * @return propagation settings
100 */
101 public ShootingPropagationSettings getShootingPropagationSettings() {
102 return shootingPropagationSettings;
103 }
104 }