Class LambertSolver


  • public class LambertSolver
    extends Object
    Lambert position-based Initial Orbit Determination (IOD) algorithm, assuming Keplerian motion. The method is also used for trajectory design, specially in interplanetary missions. This solver combines Dario Izzo's algorithm with Gim Der design to find all possible solutions.

    An orbit is determined from two position vectors. References: Battin, R.H., An Introduction to the Mathematics and Methods of Astrodynamics, AIAA Education, 1999. Lancaster, E.R. and Blanchard, R.C., A Unified Form of Lambert’s Theorem, Goddard Space Flight Center, 1968. Dario Izzo. Revisiting Lambert’s problem. Celestial Mechanics and Dynamical Astronomy, 2015. https://arxiv.org/abs/1403.2705 Gim J. Der. The Superior Lambert Algorithm. Advanced Maui Optical and Space Surveillance Technologies, 2011. https://amostech.com/TechnicalPapers/2011/Poster/DER.pdf

    Since:
    14.0
    Author:
    Joris Olympio, Romain Serra, Rafael Ayala
    • Constructor Detail

      • LambertSolver

        public LambertSolver​(double mu,
                             HouseholderParameters householderParameters)
        Constructor from Householder parameters object.
        Parameters:
        mu - gravitational constant
        householderParameters - parameters for the Householder solver
      • LambertSolver

        public LambertSolver​(double mu,
                             int householderMaxIterations,
                             double householderAtol,
                             double householderRtol)
        Constructor from direct Householder parameter values.
        Parameters:
        mu - gravitational constant
        householderMaxIterations - maximum number of iterations for the Householder solver
        householderAtol - absolute tolerance for the Householder solver
        householderRtol - relative tolerance for the Householder solver
      • LambertSolver

        public LambertSolver​(double mu)
        Constructor with default Householder solver parameters.
        Parameters:
        mu - gravitational constant
    • Method Detail

      • solve

        public List<LambertSolution> solve​(boolean posigrade,
                                           LambertBoundaryConditions boundaryConditions)
        Lambert's solver.
        Parameters:
        posigrade - flag indicating the direction of motion
        boundaryConditions - LambertBoundaryConditions holding the boundary conditions
        Returns:
        a list of solutions
      • solve

        public List<LambertSolution> solve​(boolean posigrade,
                                           int nRevs,
                                           LambertBoundaryConditions boundaryConditions)
        Lambert's solver, with user provided number of complete revolutions.
        Parameters:
        posigrade - flag indicating the direction of motion
        nRevs - number of complete revolutions
        boundaryConditions - LambertBoundaryConditions holding the boundary conditions
        Returns:
        a list of solutions
      • initialSetup

        public void initialSetup​(boolean posigrade,
                                 LambertBoundaryConditions boundaryConditions)
        Initial set up of geometry and auxiliary variables.
        Parameters:
        posigrade - flag indicating the direction of motion
        boundaryConditions - LambertBoundaryConditions holding the boundary conditions
      • initialGuessX

        public static double initialGuessX​(double tau,
                                           double sigma,
                                           int nRevs,
                                           boolean lowPath)
        Initial guess for x0.
        Parameters:
        tau - value of tau
        sigma - value of sigma
        nRevs - number of complete revolutions
        lowPath - flag indicating low path
        Returns:
        initial guess for x0
      • calculateY

        public static double calculateY​(double x,
                                        double sigma)
        Calculate value of y from x (and sigma).
        Parameters:
        x - value of x
        sigma - value of sigma
        Returns:
        value of y
      • householderSolver

        public static double householderSolver​(double x0,
                                               double tau0,
                                               double sigma,
                                               int nRevs,
                                               int maxIterations,
                                               double atol,
                                               double rtol)
        Householder solver for the Lambert problem.
        Parameters:
        x0 - initial guess for x
        tau0 - value of tau0
        sigma - value of sigma
        nRevs - number of complete revolutions
        maxIterations - maximum number of iterations
        atol - absolute tolerance for convergence
        rtol - relative tolerance for convergence
        Returns:
        value of x
      • reconstructVrVt

        public static double[] reconstructVrVt​(double x,
                                               double y,
                                               double r1,
                                               double r2,
                                               double sigma,
                                               double gamma,
                                               double rho,
                                               double zeta)
        Reconstruct the values of Vr and Vt (radial and transversal components of velocity). These are used together with the ir and it vectors to compute the velocity vectors at the beginning and end of the transfer.
        Parameters:
        x - value of x
        y - value of y
        r1 - value of r1
        r2 - value of r2
        sigma - value of sigma
        gamma - value of gamma
        rho - value of rho
        zeta - value of zeta
        Returns:
        an array containing the values of Vr and Vt at the begginning and end of the transfer
      • hyperg2F1

        public static double hyperg2F1​(double a,
                                       double b,
                                       double c,
                                       double z,
                                       double eps,
                                       int maxIter)
        Calculate the value of Gaussian hypergeometric function 2F1. Currently we use the raw series expansion. This means we have the following constraints: |z| smaller than 1, c larger than 0, c != 0. Implementation based on Taylor series expansion method (a) in John Pearson's thesis https://people.maths.ox.ac.uk/porterm/research/pearson_final.pdf , page 31.
        Parameters:
        a - value of a
        b - value of b
        c - value of c
        z - value of z (|z| smaller than 1)
        eps - convergence threshold
        maxIter - maximum number of iterations
        Returns:
        value of the 2F1 hypergeometric function
      • computeJacobian

        public RealMatrix computeJacobian​(LambertBoundaryConditions boundaryConditions,
                                          LambertBoundaryVelocities velocities)
        Computes the Jacobian matrix of the Lambert solution. The rows represent the initial and terminal velocity vectors. The columns represent the parameters: initial time, initial position, terminal time, terminal velocity.

        Reference: Di Lizia, P., Armellin, R., Zazzera, F. B., and Berz, M. High Order Expansion of the Solution of Two-Point Boundary Value Problems using Differential Algebra: Applications to Spacecraft Dynamics.

        Parameters:
        boundaryConditions - Lambert boundary conditions
        velocities - velocities of a Lambert solution to compute the Jacobian for
        Returns:
        Jacobian matrix
      • getMu

        public double getMu()