Class LeastSquaresConverter
- java.lang.Object
-
- org.orekit.propagation.conversion.osc2mean.LeastSquaresConverter
-
- All Implemented Interfaces:
OsculatingToMeanConverter
public class LeastSquaresConverter extends Object implements OsculatingToMeanConverter
Class enabling conversion from osculating to mean orbit for a given theory using a least-squares algorithm.- Since:
- 13.0
- Author:
- Pascal Parraud
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations.static double
DEFAULT_THRESHOLD
Default convergence threshold.
-
Constructor Summary
Constructors Constructor Description LeastSquaresConverter()
Default constructor.LeastSquaresConverter(double threshold, int maxIterations)
Constructor.LeastSquaresConverter(MeanTheory theory)
Constructor.LeastSquaresConverter(MeanTheory theory, LeastSquaresOptimizer optimizer)
Constructor.LeastSquaresConverter(MeanTheory theory, LeastSquaresOptimizer optimizer, double threshold, int maxIterations)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldOrbit<T>convertToMean(FieldOrbit<T> osculating)
Converts an osculating orbit into a mean orbit.Orbit
convertToMean(Orbit osculating)
Converts an osculating orbit into a mean orbit.int
getIterationsNb()
Gets the number of iterations performed by the last conversion.int
getMaxIterations()
Gets the maximum number of iterations.MeanTheory
getMeanTheory()
Gets the theory defining the mean orbit.LeastSquaresOptimizer
getOptimizer()
Gets the optimizer.double
getRMS()
Gets the RMS for the last conversion.double
getThreshold()
Gets the convergence threshold.void
setMaxIterations(int maxIterations)
Sets maximum number of iterations.void
setMeanTheory(MeanTheory meanTheory)
Sets the theory defining the mean orbit.void
setOptimizer(LeastSquaresOptimizer optimizer)
Sets the optimizer.void
setThreshold(double threshold)
Sets the convergence threshold.
-
-
-
Field Detail
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
Default convergence threshold.- See Also:
- Constant Field Values
-
DEFAULT_MAX_ITERATIONS
public static final int DEFAULT_MAX_ITERATIONS
Default maximum number of iterations.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LeastSquaresConverter
public LeastSquaresConverter()
Default constructor.The mean theory and the optimizer must be set before converting.
-
LeastSquaresConverter
public LeastSquaresConverter(MeanTheory theory)
Constructor.The optimizer must be set before converting.
- Parameters:
theory
- mean theory to be used
-
LeastSquaresConverter
public LeastSquaresConverter(MeanTheory theory, LeastSquaresOptimizer optimizer)
Constructor.- Parameters:
theory
- mean theory to be usedoptimizer
- optimizer to be used
-
LeastSquaresConverter
public LeastSquaresConverter(double threshold, int maxIterations)
Constructor.The mean theory and the optimizer must be set before converting.
- Parameters:
threshold
- convergence thresholdmaxIterations
- maximum number of iterations
-
LeastSquaresConverter
public LeastSquaresConverter(MeanTheory theory, LeastSquaresOptimizer optimizer, double threshold, int maxIterations)
Constructor.- Parameters:
theory
- mean theory to be usedoptimizer
- optimizer to be usedthreshold
- convergence thresholdmaxIterations
- maximum number of iterations
-
-
Method Detail
-
getMeanTheory
public MeanTheory getMeanTheory()
Gets the theory defining the mean orbit.- Specified by:
getMeanTheory
in interfaceOsculatingToMeanConverter
- Returns:
- the mean theory
-
setMeanTheory
public void setMeanTheory(MeanTheory meanTheory)
Sets the theory defining the mean orbit.- Specified by:
setMeanTheory
in interfaceOsculatingToMeanConverter
- Parameters:
meanTheory
- the mean theory
-
getOptimizer
public LeastSquaresOptimizer getOptimizer()
Gets the optimizer.- Returns:
- the optimizer
-
setOptimizer
public void setOptimizer(LeastSquaresOptimizer optimizer)
Sets the optimizer.- Parameters:
optimizer
- the optimizer
-
getThreshold
public double getThreshold()
Gets the convergence threshold.- Returns:
- convergence threshold
-
setThreshold
public void setThreshold(double threshold)
Sets the convergence threshold.- Parameters:
threshold
- convergence threshold
-
getMaxIterations
public int getMaxIterations()
Gets the maximum number of iterations.- Returns:
- maximum number of iterations
-
setMaxIterations
public void setMaxIterations(int maxIterations)
Sets maximum number of iterations.- Parameters:
maxIterations
- maximum number of iterations
-
getRMS
public double getRMS()
Gets the RMS for the last conversion.- Returns:
- the RMS
-
getIterationsNb
public int getIterationsNb()
Gets the number of iterations performed by the last conversion.- Returns:
- number of iterations
-
convertToMean
public Orbit convertToMean(Orbit osculating)
Converts an osculating orbit into a mean orbit. Uses a least-square algorithm.- Specified by:
convertToMean
in interfaceOsculatingToMeanConverter
- Parameters:
osculating
- osculating orbit- Returns:
- mean orbit
-
convertToMean
public <T extends CalculusFieldElement<T>> FieldOrbit<T> convertToMean(FieldOrbit<T> osculating)
Converts an osculating orbit into a mean orbit. Uses a least-square algorithm.- Specified by:
convertToMean
in interfaceOsculatingToMeanConverter
- Type Parameters:
T
- type of the filed elements- Parameters:
osculating
- osculating orbit- Returns:
- mean orbit
-
-