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()
      • addPoint

        public void addPoint​(AbsoluteDate date,
                             double osculatingValue)
        Add a fitting point.
        Parameters:
        date - date of the point
        osculatingValue - osculating value
      • 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