Class AbstractFixedBoundaryCartesianSingleShooting
- java.lang.Object
-
- org.orekit.control.indirect.shooting.AbstractIndirectShooting
-
- org.orekit.control.indirect.shooting.AbstractFixedBoundaryCartesianSingleShooting
-
- Direct Known Subclasses:
NewtonFixedBoundaryCartesianSingleShooting
public abstract class AbstractFixedBoundaryCartesianSingleShooting extends AbstractIndirectShooting
Abstract class for indirect single shooting methods with Cartesian coordinates for fixed time fixed boundary. Inheritors must implement the iteration update, assuming derivatives are needed. Terminal mass is assumed to be free, thus corresponding adjoint must vanish at terminal time. On the other hand, other terminal adjoint variables are free because the Cartesian state is fixed.- Since:
- 12.2
- Author:
- Romain Serra
- See Also:
CartesianAdjointDerivativesProvider
,FieldCartesianAdjointDerivativesProvider
-
-
Field Summary
-
Fields inherited from class org.orekit.control.indirect.shooting.AbstractIndirectShooting
DEFAULT_TOLERANCE_MASS_ADJOINT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFixedBoundaryCartesianSingleShooting(ShootingPropagationSettings propagationSettings, FixedTimeBoundaryOrbits boundaryConditions, CartesianBoundaryConditionChecker conditionChecker)
Constructor with boundary conditions as orbits.protected
AbstractFixedBoundaryCartesianSingleShooting(ShootingPropagationSettings propagationSettings, FixedTimeCartesianBoundaryStates boundaryConditions, CartesianBoundaryConditionChecker conditionChecker)
Constructor with boundary conditions as orbits.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T extends CalculusFieldElement<T>>
FieldOrdinaryDifferentialEquation<T>buildFieldODE(FieldAbsoluteDate<T> referenceDate)
Build Ordinary Differential Equation for Field.protected NumericalPropagator
buildPropagator(SpacecraftState initialState)
Create numerical propagator.protected FieldSpacecraftState<Gradient>
createFieldInitialStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)
Create initial Gradient state with input mass and adjoint vector, the latter being the independent variables.protected <T extends CalculusFieldElement<T>>
FieldSpacecraftState<T>createFieldState(FieldAbsoluteDate<T> date, T[] cartesian, T mass, T[] adjoint)
Create state.protected SpacecraftState
createStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)
Create initial state with input mass and adjoint vector.protected CartesianBoundaryConditionChecker
getConditionChecker()
Getter for the boundary condition checker.double
getScalePositionDefects()
Getter for scale of position defects.double
getScaleVelocityDefects()
Getter for scale of velocity defects.protected TimeStampedPVCoordinates
getTerminalCartesianState()
Getter for the target terminal Cartesian state vector.void
setScalePositionDefects(double scalePositionDefects)
Setter for scale of position defects.void
setScaleVelocityDefects(double scaleVelocityDefects)
Setter for scale of velocity defects.void
setToleranceMassAdjoint(double toleranceMassAdjoint)
Setter for mass adjoint tolerance.ShootingBoundaryOutput
solve(double initialMass, double[] initialGuess)
Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables.protected abstract double[]
updateAdjoint(double[] originalInitialAdjoint, FieldSpacecraftState<Gradient> fieldTerminalState)
Update initial adjoint vector.-
Methods inherited from class org.orekit.control.indirect.shooting.AbstractIndirectShooting
buildFieldIntegrator, getPropagationSettings
-
-
-
-
Constructor Detail
-
AbstractFixedBoundaryCartesianSingleShooting
protected AbstractFixedBoundaryCartesianSingleShooting(ShootingPropagationSettings propagationSettings, FixedTimeCartesianBoundaryStates boundaryConditions, CartesianBoundaryConditionChecker conditionChecker)
Constructor with boundary conditions as orbits.- Parameters:
propagationSettings
- propagation settingsboundaryConditions
- boundary conditions asFixedTimeCartesianBoundaryStates
conditionChecker
- boundary condition checker
-
AbstractFixedBoundaryCartesianSingleShooting
protected AbstractFixedBoundaryCartesianSingleShooting(ShootingPropagationSettings propagationSettings, FixedTimeBoundaryOrbits boundaryConditions, CartesianBoundaryConditionChecker conditionChecker)
Constructor with boundary conditions as orbits.- Parameters:
propagationSettings
- propagation settingsboundaryConditions
- boundary conditions asFixedTimeBoundaryOrbits
conditionChecker
- boundary condition checker
-
-
Method Detail
-
setScalePositionDefects
public void setScalePositionDefects(double scalePositionDefects)
Setter for scale of position defects.- Parameters:
scalePositionDefects
- new scale
-
getScalePositionDefects
public double getScalePositionDefects()
Getter for scale of position defects.- Returns:
- scale
-
setScaleVelocityDefects
public void setScaleVelocityDefects(double scaleVelocityDefects)
Setter for scale of velocity defects.- Parameters:
scaleVelocityDefects
- new scale
-
getScaleVelocityDefects
public double getScaleVelocityDefects()
Getter for scale of velocity defects.- Returns:
- scale
-
getConditionChecker
protected CartesianBoundaryConditionChecker getConditionChecker()
Getter for the boundary condition checker.- Returns:
- checker
-
getTerminalCartesianState
protected TimeStampedPVCoordinates getTerminalCartesianState()
Getter for the target terminal Cartesian state vector.- Returns:
- expected terminal state
-
setToleranceMassAdjoint
public void setToleranceMassAdjoint(double toleranceMassAdjoint)
Setter for mass adjoint tolerance.- Parameters:
toleranceMassAdjoint
- new tolerance value
-
solve
public ShootingBoundaryOutput solve(double initialMass, double[] initialGuess)
Solve for the boundary conditions, given an initial mass and an initial guess for the adjoint variables.- Specified by:
solve
in classAbstractIndirectShooting
- Parameters:
initialMass
- initial massinitialGuess
- initial guess- Returns:
- boundary problem solution
-
buildPropagator
protected NumericalPropagator buildPropagator(SpacecraftState initialState)
Create numerical propagator.- Overrides:
buildPropagator
in classAbstractIndirectShooting
- Parameters:
initialState
- initial state- Returns:
- numerical propagator
-
createStateWithMassAndAdjoint
protected SpacecraftState createStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)
Create initial state with input mass and adjoint vector.- Parameters:
initialMass
- initial massinitialAdjoint
- initial adjoint variables- Returns:
- state
-
createFieldInitialStateWithMassAndAdjoint
protected FieldSpacecraftState<Gradient> createFieldInitialStateWithMassAndAdjoint(double initialMass, double[] initialAdjoint)
Create initial Gradient state with input mass and adjoint vector, the latter being the independent variables.- Parameters:
initialMass
- initial massinitialAdjoint
- initial adjoint variables- Returns:
- state
-
createFieldState
protected <T extends CalculusFieldElement<T>> FieldSpacecraftState<T> createFieldState(FieldAbsoluteDate<T> date, T[] cartesian, T mass, T[] adjoint)
Create state.- Type Parameters:
T
- field type- Parameters:
date
- epochcartesian
- Cartesian variablesmass
- massadjoint
- adjoint variables- Returns:
- state
- Since:
- 13.0
-
updateAdjoint
protected abstract double[] updateAdjoint(double[] originalInitialAdjoint, FieldSpacecraftState<Gradient> fieldTerminalState)
Update initial adjoint vector.- Parameters:
originalInitialAdjoint
- original initial adjoint (before update)fieldTerminalState
- final state of gradient propagation- Returns:
- updated initial adjoint vector
-
buildFieldODE
protected <T extends CalculusFieldElement<T>> FieldOrdinaryDifferentialEquation<T> buildFieldODE(FieldAbsoluteDate<T> referenceDate)
Build Ordinary Differential Equation for Field.- Specified by:
buildFieldODE
in classAbstractIndirectShooting
- Type Parameters:
T
- field type- Parameters:
referenceDate
- date defining the origin of times- Returns:
- Field ODE
-
-