T
- interpolated time stamped typepublic abstract class AbstractTimeInterpolator<T extends TimeStamped> extends Object implements TimeInterpolator<T>
Modifier and Type | Class and Description |
---|---|
class |
AbstractTimeInterpolator.InterpolationData
Nested class used to store interpolation data.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
Default extrapolation time threshold: 1ms.
|
static int |
DEFAULT_INTERPOLATION_POINTS
Default number of interpolation points.
|
Constructor and Description |
---|
AbstractTimeInterpolator(int interpolationPoints,
double extrapolationThreshold)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addOptionalSubInterpolatorIfDefined(TimeInterpolator<? extends TimeStamped> subInterpolator,
List<TimeInterpolator<? extends TimeStamped>> subInterpolators)
Add all lowest level sub interpolators to the sub interpolator list.
|
static void |
checkInterpolatorCompatibilityWithSampleSize(TimeInterpolator<? extends TimeStamped> interpolator,
int sampleSize)
Method checking if given interpolator is compatible with given sample size.
|
double |
getExtrapolationThreshold()
Get the extrapolation threshold.
|
int |
getNbInterpolationPoints()
Get the number of interpolation points.
|
List<TimeInterpolator<? extends TimeStamped>> |
getSubInterpolators()
Get all lowest level interpolators implemented by this instance, otherwise return a list with this instance only.
|
protected double |
getTimeParameter(AbsoluteDate interpolatingTime,
AbsoluteDate previousDate,
AbsoluteDate nextDate)
Get the time parameter which lies between [0:1] by normalizing the difference between interpolating time and previous
date by the Δt between tabulated values.
|
T |
interpolate(AbsoluteDate interpolationDate,
Collection<T> sample)
Get an interpolated instance.
|
T |
interpolate(AbsoluteDate interpolationDate,
Stream<T> sample)
Get an interpolated instance.
|
protected abstract T |
interpolate(AbstractTimeInterpolator.InterpolationData interpolationData)
Interpolate instance from given interpolation data.
|
public static final double DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
public static final int DEFAULT_INTERPOLATION_POINTS
public AbstractTimeInterpolator(int interpolationPoints, double extrapolationThreshold)
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failpublic static void checkInterpolatorCompatibilityWithSampleSize(TimeInterpolator<? extends TimeStamped> interpolator, int sampleSize)
interpolator
- interpolatorsampleSize
- sample sizepublic T interpolate(AbsoluteDate interpolationDate, Stream<T> sample)
interpolate
in interface TimeInterpolator<T extends TimeStamped>
interpolationDate
- interpolation datesample
- time stamped sampleTimeStamped
,
AbsoluteDate
public T interpolate(AbsoluteDate interpolationDate, Collection<T> sample)
interpolate
in interface TimeInterpolator<T extends TimeStamped>
interpolationDate
- interpolation datesample
- time stamped samplepublic 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<T extends TimeStamped>
public int getNbInterpolationPoints()
getNbInterpolationPoints
in interface TimeInterpolator<T extends TimeStamped>
public double getExtrapolationThreshold()
getExtrapolationThreshold
in interface TimeInterpolator<T extends TimeStamped>
protected void addOptionalSubInterpolatorIfDefined(TimeInterpolator<? extends TimeStamped> subInterpolator, List<TimeInterpolator<? extends TimeStamped>> subInterpolators)
subInterpolator
- optional sub interpolator to addsubInterpolators
- list of sub interpolatorsprotected abstract T interpolate(AbstractTimeInterpolator.InterpolationData interpolationData)
interpolationData
- interpolation dataprotected double getTimeParameter(AbsoluteDate interpolatingTime, AbsoluteDate previousDate, AbsoluteDate nextDate)
interpolatingTime
- time at which we want to interpolate a value (between previous and next tabulated dates)previousDate
- previous tabulated value datenextDate
- next tabulated value dateCopyright © 2002-2023 CS GROUP. All rights reserved.