public class SpacecraftStateInterpolator extends AbstractTimeInterpolator<SpacecraftState>
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.
SpacecraftState
AbstractTimeInterpolator.InterpolationData
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC, DEFAULT_INTERPOLATION_POINTS
Constructor and Description |
---|
SpacecraftStateInterpolator(Frame outputFrame)
Simplest constructor to create a default Hermite interpolator for every spacecraft state field.
|
SpacecraftStateInterpolator(Frame outputFrame,
TimeInterpolator<Orbit> orbitInterpolator,
TimeInterpolator<AbsolutePVCoordinates> absPVAInterpolator,
TimeInterpolator<TimeStampedDouble> massInterpolator,
TimeInterpolator<Attitude> attitudeInterpolator,
TimeInterpolator<TimeStampedDouble> additionalStateInterpolator)
Constructor with:
Default number of interpolation points of
DEFAULT_INTERPOLATION_POINTS
Default extrapolation threshold of DEFAULT_EXTRAPOLATION_THRESHOLD_SEC s
|
SpacecraftStateInterpolator(int interpolationPoints,
double extrapolationThreshold,
Frame outputFrame,
Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.
|
SpacecraftStateInterpolator(int interpolationPoints,
double extrapolationThreshold,
Frame outputFrame,
Frame attitudeReferenceFrame,
CartesianDerivativesFilter pvaFilter,
AngularDerivativesFilter angularFilter)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.
|
SpacecraftStateInterpolator(int interpolationPoints,
double extrapolationThreshold,
Frame outputFrame,
TimeInterpolator<Orbit> orbitInterpolator,
TimeInterpolator<AbsolutePVCoordinates> absPVAInterpolator,
TimeInterpolator<TimeStampedDouble> massInterpolator,
TimeInterpolator<Attitude> attitudeInterpolator,
TimeInterpolator<TimeStampedDouble> additionalStateInterpolator)
Constructor.
|
SpacecraftStateInterpolator(int interpolationPoints,
Frame outputFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.
|
SpacecraftStateInterpolator(int interpolationPoints,
Frame outputFrame,
Frame attitudeReferenceFrame)
Constructor to create a customizable Hermite interpolator for every spacecraft state field.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkSampleAndInterpolatorConsistency(List<SpacecraftState> sample,
boolean orbitInterpolatorIsPresent,
boolean absPVInterpolatorIsPresent)
Check that an interpolator exist for given sample state definition.
|
static void |
checkStatesDefinitionsConsistency(List<SpacecraftState> states)
Check that all state are either orbit defined or based on absolute position-velocity-acceleration.
|
Optional<TimeInterpolator<AbsolutePVCoordinates>> |
getAbsPVAInterpolator()
Get absolute position-velocity-acceleration interpolator.
|
Optional<TimeInterpolator<TimeStampedDouble>> |
getAdditionalStateInterpolator()
Get additional state interpolator.
|
Optional<TimeInterpolator<Attitude>> |
getAttitudeInterpolator()
Get attitude interpolator.
|
Optional<TimeInterpolator<TimeStampedDouble>> |
getMassInterpolator()
Get mass interpolator.
|
Optional<TimeInterpolator<Orbit>> |
getOrbitInterpolator()
Get orbit interpolator.
|
Frame |
getOutputFrame()
Get output frame.
|
List<TimeInterpolator<? extends TimeStamped>> |
getSubInterpolators()
Get all lowest level interpolators implemented by this instance, otherwise return a list with this instance only.
|
SpacecraftState |
interpolate(AbsoluteDate interpolationDate,
Collection<SpacecraftState> sample)
Get an interpolated instance.
|
protected SpacecraftState |
interpolate(AbstractTimeInterpolator.InterpolationData interpolationData)
Interpolate instance from given interpolation data.
|
addOptionalSubInterpolatorIfDefined, checkInterpolatorCompatibilityWithSampleSize, getCentralDate, getExtrapolationThreshold, getNbInterpolationPoints, getTimeParameter, interpolate
public SpacecraftStateInterpolator(Frame outputFrame)
The interpolators will have the following configuration :
DEFAULT_INTERPOLATION_POINTS
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
sAs 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.
outputFrame
- output frameAbstractTimeInterpolator
public SpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame)
The interpolators will have the following configuration :
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
sAs 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.
interpolationPoints
- number of interpolation pointsoutputFrame
- output frameAbstractTimeInterpolator
public SpacecraftStateInterpolator(int interpolationPoints, Frame outputFrame, Frame attitudeReferenceFrame)
The interpolators will have the following configuration :
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
sAs 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.
interpolationPoints
- number of interpolation pointsoutputFrame
- output frameattitudeReferenceFrame
- reference frame from which attitude is definedAbstractTimeInterpolator
public SpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame)
The interpolators will have the following configuration :
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.
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frameattitudeReferenceFrame
- reference frame from which attitude is definedpublic SpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, Frame attitudeReferenceFrame, CartesianDerivativesFilter pvaFilter, AngularDerivativesFilter angularFilter)
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.
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frameattitudeReferenceFrame
- reference frame from which attitude is definedpvaFilter
- filter for derivatives from the sample to use in position-velocity-acceleration interpolationangularFilter
- filter for derivatives from the sample to use in attitude interpolationpublic SpacecraftStateInterpolator(Frame outputFrame, TimeInterpolator<Orbit> orbitInterpolator, TimeInterpolator<AbsolutePVCoordinates> absPVAInterpolator, TimeInterpolator<TimeStampedDouble> massInterpolator, TimeInterpolator<Attitude> attitudeInterpolator, TimeInterpolator<TimeStampedDouble> additionalStateInterpolator)
DEFAULT_INTERPOLATION_POINTS
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
sAt 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.
BEWARE: output frame must be inertial if interpolated spacecraft states are defined by orbit. Throws an error otherwise.
BEWARE: it is up to the user to check the consistency of input interpolators.
outputFrame
- output frame (inertial if the user is planning to use the orbit interpolator)orbitInterpolator
- orbit interpolator (can be null if absPVAInterpolator is defined)absPVAInterpolator
- absolute position-velocity-acceleration (can be null if orbitInterpolator is defined)massInterpolator
- mass interpolator (can be null)attitudeInterpolator
- attitude interpolator (can be null)additionalStateInterpolator
- additional state interpolator (can be null)AbstractTimeInterpolator
public SpacecraftStateInterpolator(int interpolationPoints, double extrapolationThreshold, Frame outputFrame, TimeInterpolator<Orbit> orbitInterpolator, TimeInterpolator<AbsolutePVCoordinates> absPVAInterpolator, TimeInterpolator<TimeStampedDouble> massInterpolator, TimeInterpolator<Attitude> attitudeInterpolator, TimeInterpolator<TimeStampedDouble> additionalStateInterpolator)
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.
BEWARE: output frame must be inertial if interpolated spacecraft states are defined by orbit. Throws an error otherwise.
BEWARE: it is up to the user to check the consistency of input interpolators.
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failoutputFrame
- output frame (inertial if the user is planning to use the orbit interpolator)orbitInterpolator
- orbit interpolator (can be null if absPVAInterpolator is defined)absPVAInterpolator
- absolute position-velocity-acceleration (can be null if orbitInterpolator is defined)massInterpolator
- mass interpolator (can be null)attitudeInterpolator
- attitude interpolator (can be null)additionalStateInterpolator
- additional state interpolator (can be null)public static void checkSampleAndInterpolatorConsistency(List<SpacecraftState> sample, boolean orbitInterpolatorIsPresent, boolean absPVInterpolatorIsPresent)
sample
- sample (non empty)orbitInterpolatorIsPresent
- flag defining if an orbit interpolator has been defined for this instanceabsPVInterpolatorIsPresent
- flag defining if an absolute position-velocity-acceleration interpolator has been
defined for this instanceOrekitIllegalArgumentException
- if there is no defined interpolator for given sample spacecraft state
definition typepublic static void checkStatesDefinitionsConsistency(List<SpacecraftState> states)
states
- spacecraft state samplepublic SpacecraftState interpolate(AbsoluteDate interpolationDate, Collection<SpacecraftState> sample)
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
.
interpolate
in interface TimeInterpolator<SpacecraftState>
interpolate
in class AbstractTimeInterpolator<SpacecraftState>
interpolationDate
- interpolation datesample
- time stamped sampleOrekitIllegalArgumentException
- 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 typepublic List<TimeInterpolator<? extends TimeStamped>> getSubInterpolators()
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).
getSubInterpolators
in interface TimeInterpolator<SpacecraftState>
getSubInterpolators
in class AbstractTimeInterpolator<SpacecraftState>
protected SpacecraftState interpolate(AbstractTimeInterpolator.InterpolationData interpolationData)
interpolate
in class AbstractTimeInterpolator<SpacecraftState>
interpolationData
- interpolation datapublic Frame getOutputFrame()
public Optional<TimeInterpolator<Orbit>> getOrbitInterpolator()
Optional
public Optional<TimeInterpolator<AbsolutePVCoordinates>> getAbsPVAInterpolator()
Optional
public Optional<TimeInterpolator<TimeStampedDouble>> getMassInterpolator()
Optional
public Optional<TimeInterpolator<Attitude>> getAttitudeInterpolator()
Optional
public Optional<TimeInterpolator<TimeStampedDouble>> getAdditionalStateInterpolator()
Optional
Copyright © 2002-2023 CS GROUP. All rights reserved.