Package org.orekit.utils
Class SecularAndHarmonic
- java.lang.Object
-
- org.orekit.utils.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 Summary
Constructors Constructor Description SecularAndHarmonic(int secularDegree, double... pulsations)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoint(AbsoluteDate date, double osculatingValue)
Add a fitting point.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.void
fit()
Fit parameters.double[]
getFittedParameters()
Get a copy of the last fitted parameters.double
getHarmonicAmplitude()
Get an upper bound of the fitted harmonic amplitude.AbsoluteDate
getReferenceDate()
Get the reference date.double
meanDerivative(AbsoluteDate date, int degree, int harmonics)
Get mean derivative, truncated to first components.double
meanSecondDerivative(AbsoluteDate date, int degree, int harmonics)
Get mean second derivative, truncated to first components.double
meanValue(AbsoluteDate date, int degree, int harmonics)
Get mean value, truncated to first components.double
osculatingDerivative(AbsoluteDate date)
Get fitted osculating derivative.double
osculatingSecondDerivative(AbsoluteDate date)
Get fitted osculating second derivative.double
osculatingValue(AbsoluteDate date)
Get fitted osculating value.void
resetFitting(AbsoluteDate date, double... initialGuess)
Reset fitting.
-
-
-
Method Detail
-
resetFitting
public void resetFitting(AbsoluteDate date, double... initialGuess)
Reset fitting.- Parameters:
date
- reference dateinitialGuess
- 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 pointosculatingValue
- osculating value
-
getReferenceDate
public AbsoluteDate getReferenceDate()
Get the reference date.- Returns:
- reference date
- See Also:
resetFitting(AbsoluteDate, double...)
-
getHarmonicAmplitude
public double getHarmonicAmplitude()
Get an upper bound of the fitted harmonic amplitude.- Returns:
- upper bound of the fitted harmonic amplitude
-
fit
public void fit()
Fit parameters.- See Also:
getFittedParameters()
-
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 datedegree
- degree of polynomial secular part to considerharmonics
- 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 datedegree
- degree of polynomial secular part to considerharmonics
- 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 polynomialcombinedReference
- desired reference date for the combined polynomialmeanDegree
- degree of polynomial secular part to considermeanHarmonics
- number of harmonics terms to considerstart
- start date of the approximation time rangeend
- end date of the approximation time rangestep
- 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 datedegree
- degree of polynomial secular partharmonics
- number of harmonics terms to consider- Returns:
- mean second derivative at current date
-
-