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.void
addWeightedPoint(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.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.double[]
getPulsations()
Get the pulsations of harmonic part.AbsoluteDate
getReferenceDate()
Get the reference date.int
getSecularDegree()
Get degree of polynomial secular part.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.void
setConvergenceRMS(double convergenceRMS)
Set RMS for convergence.void
setMaxIter(int maxIter)
Set maximum number of iterations.
-
-
-
Method Detail
-
resetFitting
public void resetFitting(AbsoluteDate date, double... initialGuess)
Reset fitting.- Parameters:
date
- reference dateinitialGuess
- 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
-
addPoint
public void addPoint(AbsoluteDate date, double osculatingValue)
Add a fitting point.The point weight is set to 1.0
- Parameters:
date
- date of the pointosculatingValue
- osculating value- See Also:
addWeightedPoint(AbsoluteDate, double, double)
-
addWeightedPoint
public void addWeightedPoint(AbsoluteDate date, double osculatingValue, double weight)
Add a weighted fitting point.- Parameters:
date
- date of the pointosculatingValue
- osculating valueweight
- weight of the points- Since:
- 12.0
-
getReferenceDate
public AbsoluteDate getReferenceDate()
Get the reference date.- Returns:
- reference date
- See Also:
resetFitting(AbsoluteDate, double...)
-
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()
-
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
-
-