Class LambertDifferentialCorrector

java.lang.Object
org.orekit.control.heuristics.lambert.LambertDifferentialCorrector

public class LambertDifferentialCorrector extends Object
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 Details

    • DEFAULT_POSITION_TOLERANCE

      public static final double DEFAULT_POSITION_TOLERANCE
      Default value for convergence (on the position vector).
      See Also:
    • DEFAULT_MAX_ITER

      public static final int DEFAULT_MAX_ITER
      Default maximum number of iterations.
      See Also:
  • Constructor Details

    • LambertDifferentialCorrector

      public LambertDifferentialCorrector(LambertBoundaryConditions lambertBoundaryConditions)
      Constructor.
      Parameters:
      lambertBoundaryConditions - boundary conditions
  • Method Details

    • getLambertBoundaryConditions

      public LambertBoundaryConditions 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

      public void setStmName(String stmName)
      Setter for the state transition matrix name.
      Parameters:
      stmName - name
    • getStmName

      public String 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 MatricesHarvester getMatricesHarvester()
      Protected getter for the state transition matrices harvester.
      Returns:
      harvester
    • getDecompositionSolver

      protected DecompositionSolver getDecompositionSolver(RealMatrix matrix)
      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 corrections
      guessInitialVelocity - guess on the initial velocity vector
      Returns:
      boundary velocities (null if not converged)
    • init

      protected void init(AbstractPropagator propagator, Vector3D guessInitialVelocity)
      Initialize propagator.
      Parameters:
      propagator - propagator to be used for differential corrections
      guessInitialVelocity - guess on the initial velocity vector
    • iterate

      protected LambertBoundaryVelocities iterate(AbstractPropagator propagator)
      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 - propagator
      templateState - template state
      initialVelocity - initial velocity to use
      Returns:
      full propagation state for initialization
    • computeNewtonCorrection

      protected Vector3D computeNewtonCorrection(Vector3D positionDifference, RealMatrix cartesianStm)
      Method computing the Newton-Raphson correction.
      Parameters:
      positionDifference - position residuals
      cartesianStm - Cartesian state transition matrix
      Returns:
      correction
    • getCartesianStm

      protected RealMatrix getCartesianStm(SpacecraftState initialState, SpacecraftState terminalState)
      Computes the state transition matrix in Cartesian coordinates.
      Parameters:
      initialState - initial state
      terminalState - terminal state
      Returns:
      Cartesian STM
    • hasConverged

      protected boolean hasConverged(Vector3D positionDifference)
      Checks convergence.
      Parameters:
      positionDifference - position residuals
      Returns:
      convergence flag