T
- interpolated time stamped typeKK
- type of the field elementpublic abstract class AbstractFieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>> extends Object implements FieldTimeInterpolator<T,KK>
Modifier and Type | Class and Description |
---|---|
class |
AbstractFieldTimeInterpolator.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 |
---|
AbstractFieldTimeInterpolator(int interpolationPoints,
double extrapolationThreshold)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected <S extends org.hipparchus.CalculusFieldElement<S>> |
addOptionalSubInterpolatorIfDefined(FieldTimeInterpolator<? extends FieldTimeStamped<S>,S> subInterpolator,
List<FieldTimeInterpolator<? extends FieldTimeStamped<S>,S>> subInterpolators)
Add all lowest level sub interpolators to the sub interpolator list.
|
static <T extends org.hipparchus.CalculusFieldElement<T>> |
checkInterpolatorCompatibilityWithSampleSize(FieldTimeInterpolator<? extends FieldTimeStamped<T>,T> interpolator,
int sampleSize)
Method checking if given interpolator is compatible with given sample size.
|
static <T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>> |
getCentralDate(FieldAbsoluteDate<KK> date,
ImmutableFieldTimeStampedCache<T,KK> cachedSamples,
double threshold)
Get the central date to use to find neighbors while taking into account extrapolation threshold.
|
double |
getExtrapolationThreshold()
Get the extrapolation threshold.
|
int |
getNbInterpolationPoints()
Get the number of interpolation points.
|
List<FieldTimeInterpolator<? extends FieldTimeStamped<KK>,KK>> |
getSubInterpolators()
Get all lowest level interpolators implemented by this instance, otherwise return a list with this instance only.
|
protected KK |
getTimeParameter(FieldAbsoluteDate<KK> interpolatingTime,
FieldAbsoluteDate<KK> previousDate,
FieldAbsoluteDate<KK> 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.
|
protected abstract T |
interpolate(AbstractFieldTimeInterpolator.InterpolationData interpolationData)
Interpolate instance from given interpolation data.
|
T |
interpolate(FieldAbsoluteDate<KK> interpolationDate,
Collection<T> sample)
Get an interpolated instance.
|
T |
interpolate(FieldAbsoluteDate<KK> interpolationDate,
Stream<T> sample)
Get an interpolated instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
interpolate, interpolate
public static final double DEFAULT_EXTRAPOLATION_THRESHOLD_SEC
public static final int DEFAULT_INTERPOLATION_POINTS
public AbstractFieldTimeInterpolator(int interpolationPoints, double extrapolationThreshold)
interpolationPoints
- number of interpolation pointsextrapolationThreshold
- extrapolation threshold beyond which the propagation will failpublic static <T extends org.hipparchus.CalculusFieldElement<T>> void checkInterpolatorCompatibilityWithSampleSize(FieldTimeInterpolator<? extends FieldTimeStamped<T>,T> interpolator, int sampleSize)
T
- type of the field elementsinterpolator
- interpolatorsampleSize
- sample sizepublic T interpolate(FieldAbsoluteDate<KK> interpolationDate, Stream<T> sample)
interpolate
in interface FieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>>
interpolationDate
- interpolation datesample
- time stamped sampleTimeStamped
,
AbsoluteDate
public T interpolate(FieldAbsoluteDate<KK> interpolationDate, Collection<T> sample)
interpolate
in interface FieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>>
interpolationDate
- interpolation datesample
- time stamped samplepublic static <T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>> FieldAbsoluteDate<KK> getCentralDate(FieldAbsoluteDate<KK> date, ImmutableFieldTimeStampedCache<T,KK> cachedSamples, double threshold)
T
- type of time stamped elementKK
- type of calculus field elementdate
- interpolation datecachedSamples
- cached samplesthreshold
- extrapolation thresholdpublic List<FieldTimeInterpolator<? extends FieldTimeStamped<KK>,KK>> 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 FieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>>
public int getNbInterpolationPoints()
getNbInterpolationPoints
in interface FieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>>
public double getExtrapolationThreshold()
getExtrapolationThreshold
in interface FieldTimeInterpolator<T extends FieldTimeStamped<KK>,KK extends org.hipparchus.CalculusFieldElement<KK>>
protected <S extends org.hipparchus.CalculusFieldElement<S>> void addOptionalSubInterpolatorIfDefined(FieldTimeInterpolator<? extends FieldTimeStamped<S>,S> subInterpolator, List<FieldTimeInterpolator<? extends FieldTimeStamped<S>,S>> subInterpolators)
S
- type of the field elementsubInterpolator
- optional sub interpolator to addsubInterpolators
- list of sub interpolatorsprotected abstract T interpolate(AbstractFieldTimeInterpolator.InterpolationData interpolationData)
interpolationData
- interpolation dataprotected KK getTimeParameter(FieldAbsoluteDate<KK> interpolatingTime, FieldAbsoluteDate<KK> previousDate, FieldAbsoluteDate<KK> 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.