Class LeastSquaresConverter

  • All Implemented Interfaces:
    OsculatingToMeanConverter

    public class LeastSquaresConverter
    extends Object
    implements OsculatingToMeanConverter
    Class enabling conversion from osculating to mean orbit for a given theory using a least-squares algorithm.
    Since:
    13.0
    Author:
    Pascal Parraud
    • Field Detail

      • DEFAULT_THRESHOLD

        public static final double DEFAULT_THRESHOLD
        Default convergence threshold.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_ITERATIONS

        public static final int DEFAULT_MAX_ITERATIONS
        Default maximum number of iterations.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LeastSquaresConverter

        public LeastSquaresConverter()
        Default constructor.

        The mean theory and the optimizer must be set before converting.

      • LeastSquaresConverter

        public LeastSquaresConverter​(MeanTheory theory)
        Constructor.

        The optimizer must be set before converting.

        Parameters:
        theory - mean theory to be used
      • LeastSquaresConverter

        public LeastSquaresConverter​(MeanTheory theory,
                                     LeastSquaresOptimizer optimizer)
        Constructor.
        Parameters:
        theory - mean theory to be used
        optimizer - optimizer to be used
      • LeastSquaresConverter

        public LeastSquaresConverter​(double threshold,
                                     int maxIterations)
        Constructor.

        The mean theory and the optimizer must be set before converting.

        Parameters:
        threshold - convergence threshold
        maxIterations - maximum number of iterations
      • LeastSquaresConverter

        public LeastSquaresConverter​(MeanTheory theory,
                                     LeastSquaresOptimizer optimizer,
                                     double threshold,
                                     int maxIterations)
        Constructor.
        Parameters:
        theory - mean theory to be used
        optimizer - optimizer to be used
        threshold - convergence threshold
        maxIterations - maximum number of iterations
    • Method Detail

      • setOptimizer

        public void setOptimizer​(LeastSquaresOptimizer optimizer)
        Sets the optimizer.
        Parameters:
        optimizer - the optimizer
      • getThreshold

        public double getThreshold()
        Gets the convergence threshold.
        Returns:
        convergence threshold
      • setThreshold

        public void setThreshold​(double threshold)
        Sets the convergence threshold.
        Parameters:
        threshold - convergence threshold
      • getMaxIterations

        public int getMaxIterations()
        Gets the maximum number of iterations.
        Returns:
        maximum number of iterations
      • setMaxIterations

        public void setMaxIterations​(int maxIterations)
        Sets maximum number of iterations.
        Parameters:
        maxIterations - maximum number of iterations
      • getRMS

        public double getRMS()
        Gets the RMS for the last conversion.
        Returns:
        the RMS
      • getIterationsNb

        public int getIterationsNb()
        Gets the number of iterations performed by the last conversion.
        Returns:
        number of iterations
      • convertToMean

        public Orbit convertToMean​(Orbit osculating)
        Converts an osculating orbit into a mean orbit. Uses a least-square algorithm.
        Specified by:
        convertToMean in interface OsculatingToMeanConverter
        Parameters:
        osculating - osculating orbit
        Returns:
        mean orbit