ShootingBoundaryOutput.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;

  18. import org.orekit.control.indirect.shooting.propagation.ShootingPropagationSettings;
  19. import org.orekit.propagation.SpacecraftState;

  20. /**
  21.  * Data container for two-point boundary output of indirect shooting methods.
  22.  *
  23.  * @author Romain Serra
  24.  * @since 12.2
  25.  * @see AbstractIndirectShooting
  26.  */
  27. public class ShootingBoundaryOutput {

  28.     /** Initial propagation state. */
  29.     private final SpacecraftState initialState;

  30.     /** Terminal propagation state. */
  31.     private final SpacecraftState terminalState;

  32.     /** Propagation settings. */
  33.     private final ShootingPropagationSettings shootingPropagationSettings;

  34.     /** Convergence flag. */
  35.     private final boolean converged;

  36.     /** Iteration count. */
  37.     private final int iterationCount;

  38.     /**
  39.      * Constructor.
  40.      * @param converged convergence flag
  41.      * @param iterationCount iteration number
  42.      * @param initialState initial state
  43.      * @param terminalState terminal state
  44.      * @param shootingPropagationSettings propagation settings
  45.      */
  46.     public ShootingBoundaryOutput(final boolean converged, final int iterationCount,
  47.                                   final SpacecraftState initialState,
  48.                                   final ShootingPropagationSettings shootingPropagationSettings,
  49.                                   final SpacecraftState terminalState) {
  50.         this.converged = converged;
  51.         this.iterationCount = iterationCount;
  52.         this.initialState = initialState;
  53.         this.terminalState = terminalState;
  54.         this.shootingPropagationSettings = shootingPropagationSettings;
  55.     }

  56.     /**
  57.      * Getter for convergence flag.
  58.      * @return convergence flag
  59.      */
  60.     public boolean isConverged() {
  61.         return converged;
  62.     }

  63.     /**
  64.      * Getter for the iteration number.
  65.      * @return count
  66.      */
  67.     public int getIterationCount() {
  68.         return iterationCount;
  69.     }

  70.     /**
  71.      * Getter for the initial state.
  72.      * @return initial state
  73.      */
  74.     public SpacecraftState getInitialState() {
  75.         return initialState;
  76.     }

  77.     /**
  78.      * Getter for the terminal state.
  79.      * @return terminal state
  80.      */
  81.     public SpacecraftState getTerminalState() {
  82.         return terminalState;
  83.     }

  84.     /**
  85.      * Getter for the shooting propagation settings.
  86.      * @return propagation settings
  87.      */
  88.     public ShootingPropagationSettings getShootingPropagationSettings() {
  89.         return shootingPropagationSettings;
  90.     }
  91. }