Class FieldSpacecraftStateInterpolator<KK extends CalculusFieldElement<KK>>
- java.lang.Object
-
- org.orekit.time.AbstractFieldTimeInterpolator<FieldSpacecraftState<KK>,KK>
-
- org.orekit.propagation.FieldSpacecraftStateInterpolator<KK>
-
- Type Parameters:
KK
- type of the field element
- All Implemented Interfaces:
FieldTimeInterpolator<FieldSpacecraftState<KK>,KK>
public class FieldSpacecraftStateInterpolator<KK extends CalculusFieldElement<KK>> extends AbstractFieldTimeInterpolator<FieldSpacecraftState<KK>,KK>
Generic class for spacecraft state interpolator.The user can specify what interpolator to use for each attribute of the spacecraft state. However, at least one interpolator for either orbit or absolute position-velocity-acceleration is needed. All the other interpolators can be left to null if the user do not want to interpolate these values.
- Author:
- Luc Maisonobe, Vincent Cucchietti
- See Also:
SpacecraftState
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.orekit.time.AbstractFieldTimeInterpolator
AbstractFieldTimeInterpolator.InterpolationData
-
-
Field Summary
-
Fields inherited from class org.orekit.time.AbstractFieldTimeInterpolator
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC, DEFAULT_INTERPOLATION_POINTS
-
-
Constructor Summary
Constructors Constructor Description FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame, CartesianDerivativesFilter pvaFilter, AngularDerivativesFilter angularFilter)
Constructor.FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, FieldTimeInterpolator<FieldOrbit<KK>,KK> orbitInterpolator, FieldTimeInterpolator<FieldAbsolutePVCoordinates<KK>,KK> absPVAInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> massInterpolator, FieldTimeInterpolator<FieldAttitude<KK>,KK> attitudeInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> additionalStateInterpolator)
Constructor.FieldSpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.FieldSpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame, Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.FieldSpacecraftStateInterpolator(Frame outputFrame)
Simplest constructor to create a default Hermite interpolator for every spacecraft state field.FieldSpacecraftStateInterpolator(Frame outputFrame, FieldTimeInterpolator<FieldOrbit<KK>,KK> orbitInterpolator, FieldTimeInterpolator<FieldAbsolutePVCoordinates<KK>,KK> absPVAInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> massInterpolator, FieldTimeInterpolator<FieldAttitude<KK>,KK> attitudeInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> additionalStateInterpolator)
Deprecated.using this constructor may throw an exception if any given interpolator does not useAbstractFieldTimeInterpolator.DEFAULT_INTERPOLATION_POINTS
andAbstractFieldTimeInterpolator.DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
.
-
Method Summary
-
Methods inherited from class org.orekit.time.AbstractFieldTimeInterpolator
addOptionalSubInterpolatorIfDefined, checkInterpolatorCompatibilityWithSampleSize, getCentralDate, getCentralDate, getExtrapolationThreshold, getNbInterpolationPoints, getTimeParameter, interpolate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.time.FieldTimeInterpolator
interpolate, interpolate
-
-
-
-
Constructor Detail
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(Frame outputFrame)
Simplest constructor to create a default Hermite interpolator for every spacecraft state field.The interpolators will have the following configuration :
- Same frame for coordinates and attitude
- Default number of interpolation points of
DEFAULT_INTERPOLATION_POINTS
- Default extrapolation threshold of
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
s - Use of position and two time derivatives for absolute position-velocity-acceleration coordinates interpolation
- Use of angular and first time derivative for attitude interpolation
As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
outputFrame
- output frame
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.The interpolators will have the following configuration :
- Same frame for coordinates and attitude
- Default number of interpolation points of
DEFAULT_INTERPOLATION_POINTS
- Default extrapolation threshold of
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
s - Use of position and two time derivatives for absolute position-velocity-acceleration coordinates interpolation
- Use of angular and first time derivative for attitude interpolation
As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsoutputFrame
- output frame
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.The interpolators will have the following configuration :
- Same frame for coordinates and attitude
- Use of position and two time derivatives for absolute position-velocity-acceleration coordinates interpolation
- Use of angular and first time derivative for attitude interpolation
As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frame- Since:
- 12.1
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame, Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.The interpolators will have the following configuration :
- Default extrapolation threshold of
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
s - Use of position and two time derivatives for absolute position-velocity-acceleration coordinates interpolation
- Use of angular and first time derivative for attitude interpolation
As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsoutputFrame
- output frameattitudeReferenceFrame
- reference frame from which attitude is defined
- Default extrapolation threshold of
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.The interpolators will have the following configuration :
- Use of position and two time derivatives for absolute position-velocity-acceleration coordinates interpolation
- Use of angular and first time derivative for attitude interpolation
As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frameattitudeReferenceFrame
- reference frame from which attitude is defined
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame, CartesianDerivativesFilter pvaFilter, AngularDerivativesFilter angularFilter)
Constructor.As this implementation of interpolation is polynomial, it should be used only with small number of interpolation points (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
BEWARE: output frame must be inertial if this instance is going to interpolate between tabulated spacecraft states defined by orbit, will throw an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output framepvaFilter
- filter for derivatives from the sample to use in position-velocity-acceleration interpolationattitudeReferenceFrame
- reference frame from which attitude is definedangularFilter
- filter for derivatives from the sample to use in attitude interpolation
-
FieldSpacecraftStateInterpolator
@Deprecated public FieldSpacecraftStateInterpolator(Frame outputFrame, FieldTimeInterpolator<FieldOrbit<KK>,KK> orbitInterpolator, FieldTimeInterpolator<FieldAbsolutePVCoordinates<KK>,KK> absPVAInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> massInterpolator, FieldTimeInterpolator<FieldAttitude<KK>,KK> attitudeInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> additionalStateInterpolator)
Deprecated.using this constructor may throw an exception if any given interpolator does not useAbstractFieldTimeInterpolator.DEFAULT_INTERPOLATION_POINTS
andAbstractFieldTimeInterpolator.DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
. UseFieldSpacecraftStateInterpolator(int, double, Frame, FieldTimeInterpolator, FieldTimeInterpolator, FieldTimeInterpolator, FieldTimeInterpolator, FieldTimeInterpolator)
instead.Constructor.BEWARE: output frame must be inertial if interpolated spacecraft states are defined by orbit. Throws an error otherwise.
- Parameters:
outputFrame
- output frameorbitInterpolator
- orbit interpolatorabsPVAInterpolator
- absolute position-velocity-accelerationmassInterpolator
- mass interpolatorattitudeInterpolator
- attitude interpolatoradditionalStateInterpolator
- additional state interpolator
-
FieldSpacecraftStateInterpolator
public FieldSpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, FieldTimeInterpolator<FieldOrbit<KK>,KK> orbitInterpolator, FieldTimeInterpolator<FieldAbsolutePVCoordinates<KK>,KK> absPVAInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> massInterpolator, FieldTimeInterpolator<FieldAttitude<KK>,KK> attitudeInterpolator, FieldTimeInterpolator<TimeStampedField<KK>,KK> additionalStateInterpolator)
Constructor.BEWARE: output frame must be inertial if interpolated spacecraft states are defined by orbit. Throws an error otherwise.
- Parameters:
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frameorbitInterpolator
- orbit interpolatorabsPVAInterpolator
- absolute position-velocity-accelerationmassInterpolator
- mass interpolatorattitudeInterpolator
- attitude interpolatoradditionalStateInterpolator
- additional state interpolator
-
-
Method Detail
-
interpolate
public FieldSpacecraftState<KK> interpolate(FieldAbsoluteDate<KK> interpolationDate, Collection<FieldSpacecraftState<KK>> sample)
Get an interpolated instance..The additional states that are interpolated are the ones already present in the first neighbor instance. The sample instances must therefore have at least the same additional states as this neighbor instance. They may have more additional states, but the extra ones will be ignored.
All the sample instances must be based on similar trajectory data, i.e. they must either all be based on orbits or all be based on absolute position-velocity-acceleration. Any inconsistency will trigger an
OrekitIllegalArgumentException
.- Specified by:
interpolate
in interfaceFieldTimeInterpolator<FieldSpacecraftState<KK extends CalculusFieldElement<KK>>,KK extends CalculusFieldElement<KK>>
- Overrides:
interpolate
in classAbstractFieldTimeInterpolator<FieldSpacecraftState<KK extends CalculusFieldElement<KK>>,KK extends CalculusFieldElement<KK>>
- Parameters:
interpolationDate
- interpolation datesample
- time stamped sample- Returns:
- a new instance, interpolated at specified date
- Throws:
OrekitIllegalArgumentException
- if there are states defined by orbits and absolute position-velocity-acceleration coordinatesOrekitIllegalArgumentException
- if there is no defined interpolator for given sample spacecraft state definition type
-
getSubInterpolators
public List<FieldTimeInterpolator<? extends FieldTimeStamped<KK>,KK>> getSubInterpolators()
Get all lowest level interpolators implemented by this instance, otherwise return a list with this instance only.An example would be the spacecraft state interpolator which can use different interpolators for each of its attributes (orbit, absolute position-velocity-acceleration coordinates, mass...). In this case, it would return the list of all of these interpolators (or possibly all of their sub-interpolators if they were to use multiple interpolators themselves).
- Specified by:
getSubInterpolators
in interfaceFieldTimeInterpolator<FieldSpacecraftState<KK extends CalculusFieldElement<KK>>,KK extends CalculusFieldElement<KK>>
- Overrides:
getSubInterpolators
in classAbstractFieldTimeInterpolator<FieldSpacecraftState<KK extends CalculusFieldElement<KK>>,KK extends CalculusFieldElement<KK>>
- Returns:
- list of interpolators
-
interpolate
protected FieldSpacecraftState<KK> interpolate(AbstractFieldTimeInterpolator.InterpolationData interpolationData)
Interpolate instance from given interpolation data.- Specified by:
interpolate
in classAbstractFieldTimeInterpolator<FieldSpacecraftState<KK extends CalculusFieldElement<KK>>,KK extends CalculusFieldElement<KK>>
- Parameters:
interpolationData
- interpolation data- Returns:
- interpolated instance from given interpolation data.
-
getOutputFrame
public Frame getOutputFrame()
Get output frame.- Returns:
- output frame
-
getOrbitInterpolator
public Optional<FieldTimeInterpolator<FieldOrbit<KK>,KK>> getOrbitInterpolator()
Get orbit interpolator.- Returns:
- optional orbit interpolator
- See Also:
Optional
-
getAbsPVAInterpolator
public Optional<FieldTimeInterpolator<FieldAbsolutePVCoordinates<KK>,KK>> getAbsPVAInterpolator()
Get absolute position-velocity-acceleration interpolator.- Returns:
- optional absolute position-velocity-acceleration interpolator
- See Also:
Optional
-
getMassInterpolator
public Optional<FieldTimeInterpolator<TimeStampedField<KK>,KK>> getMassInterpolator()
Get mass interpolator.- Returns:
- optional mass interpolator
- See Also:
Optional
-
getAttitudeInterpolator
public Optional<FieldTimeInterpolator<FieldAttitude<KK>,KK>> getAttitudeInterpolator()
Get attitude interpolator.- Returns:
- optional attitude interpolator
- See Also:
Optional
-
getAdditionalStateInterpolator
public Optional<FieldTimeInterpolator<TimeStampedField<KK>,KK>> getAdditionalStateInterpolator()
Get additional state interpolator.- Returns:
- optional additional state interpolator
- See Also:
Optional
-
-