Class SecularAndHarmonic


  • public class SecularAndHarmonic
    extends Object
    Class for fitting evolution of osculating orbital parameters.

    This class allows conversion from osculating parameters to mean parameters.

    Author:
    Luc Maisonobe
    • Constructor Detail

      • SecularAndHarmonic

        public SecularAndHarmonic​(int secularDegree,
                                  double... pulsations)
        Simple constructor.
        Parameters:
        secularDegree - degree of polynomial secular part
        pulsations - pulsations of harmonic part
    • Method Detail

      • resetFitting

        public void resetFitting​(AbsoluteDate date,
                                 double... initialGuess)
        Reset fitting.
        Parameters:
        date - reference date
        initialGuess - initial guess for the parameters
        See Also:
        getReferenceDate()
      • setConvergenceRMS

        public void setConvergenceRMS​(double convergenceRMS)
        Set RMS for convergence.

        The RMS is the square-root of the sum of squared of the residuals, divided by the number of measurements.

        Parameters:
        convergenceRMS - RMS below which convergence is considered to have been reached
        Since:
        10.3
      • setMaxIter

        public void setMaxIter​(int maxIter)
        Set maximum number of iterations.
        Parameters:
        maxIter - maximum number of iterations
        Since:
        10.3
      • addWeightedPoint

        public void addWeightedPoint​(AbsoluteDate date,
                                     double osculatingValue,
                                     double weight)
        Add a weighted fitting point.
        Parameters:
        date - date of the point
        osculatingValue - osculating value
        weight - weight of the points
        Since:
        12.0
      • getSecularDegree

        public int getSecularDegree()
        Get degree of polynomial secular part.
        Returns:
        degree of polynomial secular part
        Since:
        12.0
      • getPulsations

        public double[] getPulsations()
        Get the pulsations of harmonic part.
        Returns:
        pulsations of harmonic part
        Since:
        12.0
      • getHarmonicAmplitude

        public double getHarmonicAmplitude()
        Get an upper bound of the fitted harmonic amplitude.
        Returns:
        upper bound of the fitted harmonic amplitude
      • getFittedParameters

        public double[] getFittedParameters()
        Get a copy of the last fitted parameters.
        Returns:
        copy of the last fitted parameters.
        See Also:
        fit()
      • osculatingValue

        public double osculatingValue​(AbsoluteDate date)
        Get fitted osculating value.
        Parameters:
        date - current date
        Returns:
        osculating value at current date
      • osculatingDerivative

        public double osculatingDerivative​(AbsoluteDate date)
        Get fitted osculating derivative.
        Parameters:
        date - current date
        Returns:
        osculating derivative at current date
      • osculatingSecondDerivative

        public double osculatingSecondDerivative​(AbsoluteDate date)
        Get fitted osculating second derivative.
        Parameters:
        date - current date
        Returns:
        osculating second derivative at current date
      • meanValue

        public double meanValue​(AbsoluteDate date,
                                int degree,
                                int harmonics)
        Get mean value, truncated to first components.
        Parameters:
        date - current date
        degree - degree of polynomial secular part to consider
        harmonics - number of harmonics terms to consider
        Returns:
        mean value at current date
      • meanDerivative

        public double meanDerivative​(AbsoluteDate date,
                                     int degree,
                                     int harmonics)
        Get mean derivative, truncated to first components.
        Parameters:
        date - current date
        degree - degree of polynomial secular part to consider
        harmonics - number of harmonics terms to consider
        Returns:
        mean derivative at current date
      • approximateAsPolynomialOnly

        public double[] approximateAsPolynomialOnly​(int combinedDegree,
                                                    AbsoluteDate combinedReference,
                                                    int meanDegree,
                                                    int meanHarmonics,
                                                    AbsoluteDate start,
                                                    AbsoluteDate end,
                                                    double step)
        Approximate an already fitted model to polynomial only terms.

        This method is mainly used in order to combine the large amplitude long periods with the secular part as a new approximate polynomial model over some time range. This should be used rather than simply extracting the polynomial coefficients from getFittedParameters() when some periodic terms amplitudes are large (for example Sun resonance effects on local solar time in sun synchronous orbits). In theses cases, the pure polynomial secular part in the coefficients may be far from the mean model.

        Parameters:
        combinedDegree - desired degree for the combined polynomial
        combinedReference - desired reference date for the combined polynomial
        meanDegree - degree of polynomial secular part to consider
        meanHarmonics - number of harmonics terms to consider
        start - start date of the approximation time range
        end - end date of the approximation time range
        step - sampling step
        Returns:
        coefficients of the approximate polynomial (in increasing degree order), using the user provided reference date
      • meanSecondDerivative

        public double meanSecondDerivative​(AbsoluteDate date,
                                           int degree,
                                           int harmonics)
        Get mean second derivative, truncated to first components.
        Parameters:
        date - current date
        degree - degree of polynomial secular part
        harmonics - number of harmonics terms to consider
        Returns:
        mean second derivative at current date