Class AbstractPropagatorConverter
java.lang.Object
org.orekit.propagation.conversion.AbstractPropagatorConverter
- All Implemented Interfaces:
PropagatorConverter
- Direct Known Subclasses:
FiniteDifferencePropagatorConverter,JacobianPropagatorConverter
Common handling of
PropagatorConverter methods for propagators conversions.
This abstract class factors the common code for propagators conversion.
Only one method must be implemented by derived classes: getObjectiveFunction().
The converter uses the LevenbergMarquardtOptimizer from the Hipparchus library. Different implementations correspond to different methods for computing the Jacobian.
- Since:
- 6.0
- Author:
- Pascal Parraud
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPropagatorConverter(PropagatorBuilder builder, double threshold, int maxIterations) Build a new instance. -
Method Summary
Modifier and TypeMethodDescriptionconvert(List<SpacecraftState> states, boolean positionOnly, String... freeParameters) Find the propagator that minimize the mean square error for a sample ofstates.convert(List<SpacecraftState> states, boolean positionOnly, List<String> freeParameters) Find the propagator that minimize the mean square error for a sample ofstates.convert(Propagator source, double timeSpan, int nbPoints, String... freeParameters) Convert a propagator to another.convert(Propagator source, double timeSpan, int nbPoints, List<String> freeParameters) Convert a propagator to another.Get the adapted propagator.intGet the number of objective function evaluations.protected FramegetFrame()Get the frame of the initial state.protected abstract MultivariateJacobianFunctiongetModel()Get the Jacobian of the function computing position/velocity at sample points.protected abstract MultivariateVectorFunctionGet the function computing position/velocity at sample points.doublegetRMS()Get the Root Mean Square Deviation of the fitting.protected List<SpacecraftState> Get the states sample.protected intGet the size of the target.protected booleanCheck if fitting uses only sample positions.
-
Constructor Details
-
AbstractPropagatorConverter
protected AbstractPropagatorConverter(PropagatorBuilder builder, double threshold, int maxIterations) Build a new instance.- Parameters:
builder- propagator builderthreshold- absolute convergence threshold for optimization algorithmmaxIterations- maximum number of iterations for fitting
-
-
Method Details
-
convert
public Propagator convert(Propagator source, double timeSpan, int nbPoints, List<String> freeParameters) throws IllegalArgumentException Convert a propagator to another.- Specified by:
convertin interfacePropagatorConverter- Parameters:
source- initial propagator (the propagator will be used for sample generation, if it is a numerical propagator, its initial state will be reset unlessAbstractIntegratedPropagator.setResetAtEnd(boolean)has been called beforehand)timeSpan- time span for fittingnbPoints- number of fitting points over time spanfreeParameters- names of the free parameters- Returns:
- adapted propagator
- Throws:
IllegalArgumentException- if one of the parameters cannot be free
-
convert
public Propagator convert(Propagator source, double timeSpan, int nbPoints, String... freeParameters) throws IllegalArgumentException Convert a propagator to another.- Specified by:
convertin interfacePropagatorConverter- Parameters:
source- initial propagator (the propagator will be used for sample generation, if it is a numerical propagator, its initial state will be reset unlessAbstractIntegratedPropagator.setResetAtEnd(boolean)has been called beforehand)timeSpan- time span for fittingnbPoints- number of fitting points over time spanfreeParameters- names of the free parameters- Returns:
- adapted propagator
- Throws:
IllegalArgumentException- if one of the parameters cannot be free
-
convert
public Propagator convert(List<SpacecraftState> states, boolean positionOnly, List<String> freeParameters) throws IllegalArgumentException Find the propagator that minimize the mean square error for a sample ofstates.- Specified by:
convertin interfacePropagatorConverter- Parameters:
states- spacecraft states sample to fitpositionOnly- if true, consider only position data otherwise both position and velocity are usedfreeParameters- names of the free parameters- Returns:
- adapted propagator
- Throws:
IllegalArgumentException- if one of the parameters cannot be free
-
convert
public Propagator convert(List<SpacecraftState> states, boolean positionOnly, String... freeParameters) throws IllegalArgumentException Find the propagator that minimize the mean square error for a sample ofstates.- Specified by:
convertin interfacePropagatorConverter- Parameters:
states- spacecraft states sample to fitpositionOnly- if true, consider only position data otherwise both position and velocity are usedfreeParameters- names of the free parameters- Returns:
- adapted propagator
- Throws:
IllegalArgumentException- if one of the parameters cannot be free
-
getAdaptedPropagator
Get the adapted propagator.- Returns:
- adapted propagator
-
getRMS
public double getRMS()Get the Root Mean Square Deviation of the fitting.- Returns:
- RMSD
-
getEvaluations
public int getEvaluations()Get the number of objective function evaluations.- Returns:
- the number of objective function evaluations.
-
getObjectiveFunction
Get the function computing position/velocity at sample points.- Returns:
- function computing position/velocity at sample points
-
getModel
Get the Jacobian of the function computing position/velocity at sample points.- Returns:
- Jacobian of the function computing position/velocity at sample points
-
isOnlyPosition
protected boolean isOnlyPosition()Check if fitting uses only sample positions.- Returns:
- true if fitting uses only sample positions
-
getTargetSize
protected int getTargetSize()Get the size of the target.- Returns:
- target size
-
getFrame
Get the frame of the initial state.- Returns:
- the orbit frame
-
getSample
Get the states sample.- Returns:
- the states sample
-