Class LambertDifferentialCorrector
java.lang.Object
org.orekit.control.heuristics.lambert.LambertDifferentialCorrector
Class implementing a differential correction for extended (meaning under arbitrary dynamics) Lambert arc
(fixed initial and terminal position vectors with fixed time).
Given boundary conditions and a guess, applies Newton-Raphson algorithm to find the solution
(initial and terminal velocity vectors) according to the propagator used.
The latter must be compatible with resetting the initial state and computing state transition matrices.
Note that propagation is not required to be forward in time.
- Since:
- 13.1
- Author:
- Romain Serra
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault maximum number of iterations.static final doubleDefault value for convergence (on the position vector). -
Constructor Summary
ConstructorsConstructorDescriptionLambertDifferentialCorrector(LambertBoundaryConditions lambertBoundaryConditions) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected SpacecraftStatebuildInitialState(AbstractPropagator propagator, SpacecraftState templateState, Vector3D initialVelocity) Method creating an initial state.protected Vector3DcomputeNewtonCorrection(Vector3D positionDifference, RealMatrix cartesianStm) Method computing the Newton-Raphson correction.protected RealMatrixgetCartesianStm(SpacecraftState initialState, SpacecraftState terminalState) Computes the state transition matrix in Cartesian coordinates.intGetter for the current iteration number.protected DecompositionSolvergetDecompositionSolver(RealMatrix matrix) Creates a linear system solver.doubleGetter for the initial mass.Getter for the boundary conditions.protected MatricesHarvesterProtected getter for the state transition matrices harvester.intGetter for the maximum number of iterations.doubleGetter for the position tolerance.Getter for the state transition matrix name.doubleGetter for the threshold used in linear system solving.protected booleanhasConverged(Vector3D positionDifference) Checks convergence.protected voidinit(AbstractPropagator propagator, Vector3D guessInitialVelocity) Initialize propagator.protected LambertBoundaryVelocitiesiterate(AbstractPropagator propagator) Apply differential corrections until convergence (interrupted by maximum iterations count).protected voidsetCurrentIter(int currentIter) Protected setter for the current iteration number.voidsetInitialMass(double initialMass) Setter for the initial mass.voidsetMaxIter(int maxIter) Setter for the maximum number of iterations.voidsetPositionTolerance(double positionTolerance) Setter for the position tolerance.voidsetStmName(String stmName) Setter for the state transition matrix name.voidsetThresholdMatrixSolver(double thresholdMatrixSolver) Setter for the threshold used in linear system solving.solve(AbstractPropagator propagator, Vector3D guessInitialVelocity) Method applying differential correction on the guess (Newton-Raphson algorithm).
-
Field Details
-
DEFAULT_POSITION_TOLERANCE
public static final double DEFAULT_POSITION_TOLERANCEDefault value for convergence (on the position vector).- See Also:
-
DEFAULT_MAX_ITER
public static final int DEFAULT_MAX_ITERDefault maximum number of iterations.- See Also:
-
-
Constructor Details
-
LambertDifferentialCorrector
Constructor.- Parameters:
lambertBoundaryConditions- boundary conditions
-
-
Method Details
-
getLambertBoundaryConditions
Getter for the boundary conditions.- Returns:
- conditions
-
setInitialMass
public void setInitialMass(double initialMass) Setter for the initial mass.- Parameters:
initialMass- initial mass
-
getInitialMass
public double getInitialMass()Getter for the initial mass.- Returns:
- initial mass
-
getPositionTolerance
public double getPositionTolerance()Getter for the position tolerance.- Returns:
- tolerance
-
setPositionTolerance
public void setPositionTolerance(double positionTolerance) Setter for the position tolerance.- Parameters:
positionTolerance- tolerance
-
setThresholdMatrixSolver
public void setThresholdMatrixSolver(double thresholdMatrixSolver) Setter for the threshold used in linear system solving.- Parameters:
thresholdMatrixSolver- threshold
-
getThresholdMatrixSolver
public double getThresholdMatrixSolver()Getter for the threshold used in linear system solving.- Returns:
- threshold
-
setStmName
Setter for the state transition matrix name.- Parameters:
stmName- name
-
getStmName
Getter for the state transition matrix name.- Returns:
- name
-
getMaxIter
public int getMaxIter()Getter for the maximum number of iterations.- Returns:
- maximum iterations
-
setMaxIter
public void setMaxIter(int maxIter) Setter for the maximum number of iterations.- Parameters:
maxIter- maximum iterations
-
setCurrentIter
protected void setCurrentIter(int currentIter) Protected setter for the current iteration number.- Parameters:
currentIter- iteration number
-
getCurrentIter
public int getCurrentIter()Getter for the current iteration number.- Returns:
- iteration number
-
getMatricesHarvester
Protected getter for the state transition matrices harvester.- Returns:
- harvester
-
getDecompositionSolver
Creates a linear system solver.- Parameters:
matrix- matrix involved in system- Returns:
- solver
-
solve
public LambertBoundaryVelocities solve(AbstractPropagator propagator, Vector3D guessInitialVelocity) Method applying differential correction on the guess (Newton-Raphson algorithm).- Parameters:
propagator- propagator to be used for differential correctionsguessInitialVelocity- guess on the initial velocity vector- Returns:
- boundary velocities (null if not converged)
-
init
Initialize propagator.- Parameters:
propagator- propagator to be used for differential correctionsguessInitialVelocity- guess on the initial velocity vector
-
iterate
Apply differential corrections until convergence (interrupted by maximum iterations count).- Parameters:
propagator- propagator- Returns:
- boundary velocities (null if not converged)
-
buildInitialState
protected SpacecraftState buildInitialState(AbstractPropagator propagator, SpacecraftState templateState, Vector3D initialVelocity) Method creating an initial state.- Parameters:
propagator- propagatortemplateState- template stateinitialVelocity- initial velocity to use- Returns:
- full propagation state for initialization
-
computeNewtonCorrection
Method computing the Newton-Raphson correction.- Parameters:
positionDifference- position residualscartesianStm- Cartesian state transition matrix- Returns:
- correction
-
getCartesianStm
Computes the state transition matrix in Cartesian coordinates.- Parameters:
initialState- initial stateterminalState- terminal state- Returns:
- Cartesian STM
-
hasConverged
Checks convergence.- Parameters:
positionDifference- position residuals- Returns:
- convergence flag
-