Package org.orekit.utils
Class SecularAndHarmonic
java.lang.Object
org.orekit.utils.SecularAndHarmonic
Class for fitting evolution of osculating orbital parameters.
This class allows conversion from osculating parameters to mean parameters.
- Author:
- Luc Maisonobe
-
Constructor Summary
ConstructorsConstructorDescriptionSecularAndHarmonic(int secularDegree, double... pulsations) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(AbsoluteDate date, double osculatingValue) Add a fitting point.voidaddWeightedPoint(AbsoluteDate date, double osculatingValue, double weight) Add a weighted 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.voidfit()Fit parameters.double[]Get a copy of the last fitted parameters.doubleGet an upper bound of the fitted harmonic amplitude.double[]Get the pulsations of harmonic part.Get the reference date.intGet degree of polynomial secular part.doublemeanDerivative(AbsoluteDate date, int degree, int harmonics) Get mean derivative, truncated to first components.doublemeanSecondDerivative(AbsoluteDate date, int degree, int harmonics) Get mean second derivative, truncated to first components.doublemeanValue(AbsoluteDate date, int degree, int harmonics) Get mean value, truncated to first components.doubleGet fitted osculating derivative.doubleGet fitted osculating second derivative.doubleosculatingValue(AbsoluteDate date) Get fitted osculating value.voidresetFitting(AbsoluteDate date, double... initialGuess) Reset fitting.voidsetConvergenceRMS(double convergenceRMS) Set RMS for convergence.voidsetMaxIter(int maxIter) Set maximum number of iterations.
-
Constructor Details
-
SecularAndHarmonic
public SecularAndHarmonic(int secularDegree, double... pulsations) Simple constructor.- Parameters:
secularDegree- degree of polynomial secular partpulsations- pulsations of harmonic part
-
-
Method Details
-
resetFitting
Reset fitting.- Parameters:
date- reference dateinitialGuess- initial guess for the parameters- See Also:
-
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
-
addPoint
Add a fitting point.The point weight is set to 1.0
- Parameters:
date- date of the pointosculatingValue- osculating value- See Also:
-
addWeightedPoint
Add a weighted fitting point.- Parameters:
date- date of the pointosculatingValue- osculating valueweight- weight of the points- Since:
- 12.0
-
getReferenceDate
Get the reference date.- Returns:
- reference date
- See Also:
-
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
-
fit
public void fit()Fit parameters.- See Also:
-
getFittedParameters
public double[] getFittedParameters()Get a copy of the last fitted parameters.- Returns:
- copy of the last fitted parameters.
- See Also:
-
osculatingValue
Get fitted osculating value.- Parameters:
date- current date- Returns:
- osculating value at current date
-
osculatingDerivative
Get fitted osculating derivative.- Parameters:
date- current date- Returns:
- osculating derivative at current date
-
osculatingSecondDerivative
Get fitted osculating second derivative.- Parameters:
date- current date- Returns:
- osculating second derivative at current date
-
meanValue
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
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
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
-