Class Ephemeris
- java.lang.Object
-
- org.orekit.propagation.AbstractPropagator
-
- org.orekit.propagation.analytical.AbstractAnalyticalPropagator
-
- org.orekit.propagation.analytical.Ephemeris
-
- All Implemented Interfaces:
BoundedPropagator
,Propagator
,PVCoordinatesProvider
public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPropagator
This class is designed to accept and handle tabulated orbital entries. Tabulated entries are classified and then extrapolated in way to obtain continuous output, with accuracy and computation methods configured by the user.- Author:
- Fabien Maussion, Véronique Pommier-Maurussane, Luc Maisonobe, Vincent Cucchietti
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.Propagator
DEFAULT_MASS
-
-
Constructor Summary
Constructors Constructor Description Ephemeris(List<SpacecraftState> states, int interpolationPoints)
Legacy constructor with tabulated states and default Hermite interpolation.Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator)
Constructor with tabulated states.Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator)
Constructor with tabulated states and associated covariances.Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator, AttitudeProvider attitudeProvider)
Constructor with tabulated states and associated covariances.Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, AttitudeProvider attitudeProvider)
Constructor with tabulated states.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpacecraftState
basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features.static void
checkInputConsistency(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator)
Check input consistency between states, covariances and their associated interpolators.static void
checkStatesAndCovariancesConsistency(List<SpacecraftState> states, List<StateCovariance> covariances)
Check that given states and covariances are consistent.protected AbstractMatricesHarvester
createHarvester(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
Create the harvester suitable for propagator.Optional<StateCovariance>
getCovariance(AbsoluteDate date)
Get the covariance at given date.Optional<TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>>>
getCovarianceInterpolator()
Get covariance interpolator.Frame
getFrame()
Get the frame in which the orbit is propagated.SpacecraftState
getInitialState()
Get the propagator initial state.String[]
getManagedAdditionalStates()
Get all the names of all managed states.protected double
getMass(AbsoluteDate date)
Get the mass.AbsoluteDate
getMaxDate()
Get the last date of the range.AbsoluteDate
getMinDate()
Get the first date of the range.TimeInterpolator<SpacecraftState>
getStateInterpolator()
Get state interpolator.boolean
isAdditionalStateManaged(String name)
Check if an additional state is managed.protected Orbit
propagateOrbit(AbsoluteDate date)
Extrapolate an orbit up to a specific target date.void
resetInitialState(SpacecraftState state)
Try (and fail) to reset the initial state.protected void
resetIntermediateState(SpacecraftState state, boolean forward)
Reset an intermediate state.-
Methods inherited from class org.orekit.propagation.analytical.AbstractAnalyticalPropagator
acceptStep, addEventDetector, clearEventsDetectors, getEphemerisGenerator, getEventDetectors, getJacobiansColumnsNames, getPvProvider, propagate
-
Methods inherited from class org.orekit.propagation.AbstractPropagator
addAdditionalStateProvider, getAdditionalStateProviders, getAttitudeProvider, getHarvester, getMultiplexer, getStartDate, initializeAdditionalStates, initializePropagation, propagate, setAttitudeProvider, setStartDate, setupMatricesComputation, stateChanged, updateAdditionalStates, updateUnmanagedStates
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.Propagator
addAdditionalStateProvider, addEventDetector, clearEventsDetectors, clearStepHandlers, getAdditionalStateProviders, getAttitudeProvider, getEphemerisGenerator, getEventDetectors, getMultiplexer, getPosition, getPVCoordinates, propagate, propagate, setAttitudeProvider, setStepHandler, setStepHandler, setupMatricesComputation
-
-
-
-
Constructor Detail
-
Ephemeris
public Ephemeris(List<SpacecraftState> states, int interpolationPoints) throws MathIllegalArgumentException
Legacy constructor with tabulated states and default Hermite interpolation.As this implementation of interpolation is polynomial, it should be used only with small samples (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
- Parameters:
states
- list of spacecraft statesinterpolationPoints
- number of points to use in interpolation- Throws:
MathIllegalArgumentException
- if the number of states is smaller than the number of points to use in interpolationOrekitIllegalArgumentException
- if states are not defined the same way (orbit or absolute position-velocity-acceleration)- See Also:
Ephemeris(List, TimeInterpolator, List, TimeInterpolator)
,SpacecraftStateInterpolator
-
Ephemeris
public Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator) throws MathIllegalArgumentException
Constructor with tabulated states.- Parameters:
states
- list of spacecraft statesstateInterpolator
- spacecraft state interpolator- Throws:
MathIllegalArgumentException
- if the number of states is smaller than the number of points to use in interpolationOrekitIllegalArgumentException
- if states are not defined the same way (orbit or absolute position-velocity-acceleration)- See Also:
Ephemeris(List, TimeInterpolator, List, TimeInterpolator)
-
Ephemeris
public Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, AttitudeProvider attitudeProvider) throws MathIllegalArgumentException
Constructor with tabulated states.- Parameters:
states
- list of spacecraft statesstateInterpolator
- spacecraft state interpolatorattitudeProvider
- attitude law to use, null by default- Throws:
MathIllegalArgumentException
- if the number of states is smaller than the number of points to use in interpolationOrekitIllegalArgumentException
- if states are not defined the same way (orbit or absolute position-velocity-acceleration)- See Also:
Ephemeris(List, TimeInterpolator, List, TimeInterpolator)
-
Ephemeris
public Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator) throws MathIllegalArgumentException
Constructor with tabulated states and associated covariances.- Parameters:
states
- list of spacecraft statesstateInterpolator
- spacecraft state interpolatorcovariances
- tabulated covariances associated to tabulated states ephemeris bounds to be doing extrapolationcovarianceInterpolator
- covariance interpolator- Throws:
MathIllegalArgumentException
- if the number of states is smaller than the number of points to use in interpolationOrekitIllegalArgumentException
- if states are not defined the same way (orbit or absolute position-velocity-acceleration)OrekitIllegalArgumentException
- if number of states is different from the number of covariancesOrekitIllegalStateException
- if dates between states and associated covariances are different- Since:
- 9.0
- See Also:
Ephemeris(List, TimeInterpolator, List, TimeInterpolator, AttitudeProvider)
-
Ephemeris
public Ephemeris(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator, AttitudeProvider attitudeProvider) throws MathIllegalArgumentException
Constructor with tabulated states and associated covariances.The user is expected to explicitly define an attitude provider if they want to use one. Otherwise, it is null by default
- Parameters:
states
- list of spacecraft statesstateInterpolator
- spacecraft state interpolatorcovariances
- tabulated covariances associated to tabulated statescovarianceInterpolator
- covariance interpolatorattitudeProvider
- attitude law to use, null by default- Throws:
MathIllegalArgumentException
- if the number of states is smaller than the number of points to use in interpolationOrekitIllegalArgumentException
- if states are not defined the same way (orbit or absolute position-velocity-acceleration)OrekitIllegalArgumentException
- if number of states is different from the number of covariancesOrekitIllegalStateException
- if dates between states and associated covariances are different- Since:
- 10.1
-
-
Method Detail
-
checkInputConsistency
public static void checkInputConsistency(List<SpacecraftState> states, TimeInterpolator<SpacecraftState> stateInterpolator, List<StateCovariance> covariances, TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>> covarianceInterpolator)
Check input consistency between states, covariances and their associated interpolators.- Parameters:
states
- spacecraft states samplestateInterpolator
- spacecraft state interpolatorcovariances
- covariances samplecovarianceInterpolator
- covariance interpolator
-
checkStatesAndCovariancesConsistency
public static void checkStatesAndCovariancesConsistency(List<SpacecraftState> states, List<StateCovariance> covariances)
Check that given states and covariances are consistent.- Parameters:
states
- tabulates states to checkcovariances
- tabulated covariances associated to tabulated states to check
-
getMinDate
public AbsoluteDate getMinDate()
Get the first date of the range.- Specified by:
getMinDate
in interfaceBoundedPropagator
- Returns:
- the first date of the range
-
getMaxDate
public AbsoluteDate getMaxDate()
Get the last date of the range.- Specified by:
getMaxDate
in interfaceBoundedPropagator
- Returns:
- the last date of the range
-
getFrame
public Frame getFrame()
Get the frame in which the orbit is propagated.The propagation frame is the definition frame of the initial state, so this method should be called after this state has been set, otherwise it may return null.
- Specified by:
getFrame
in interfacePropagator
- Overrides:
getFrame
in classAbstractPropagator
- Returns:
- frame in which the orbit is propagated
- See Also:
Propagator.resetInitialState(SpacecraftState)
-
getCovariance
public Optional<StateCovariance> getCovariance(AbsoluteDate date)
Get the covariance at given date.BEWARE : If this instance has been created without sample of covariances and/or with spacecraft states defined with absolute position-velocity-acceleration, it will return an empty
Optional
.- Parameters:
date
- date at which the covariance is desired- Returns:
- covariance at given date
- See Also:
Optional
-
basicPropagate
public SpacecraftState basicPropagate(AbsoluteDate date)
Propagate an orbit without any fancy features.This method is similar in spirit to the
AbstractAnalyticalPropagator.propagate(org.orekit.time.AbsoluteDate, org.orekit.time.AbsoluteDate)
method, except that it does not call any handler during propagation, nor any discrete events, not additional states. It always stop exactly at the specified date.- Overrides:
basicPropagate
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for propagation- Returns:
- state at specified date
-
propagateOrbit
protected Orbit propagateOrbit(AbsoluteDate date)
Extrapolate an orbit up to a specific target date.- Specified by:
propagateOrbit
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for the orbit- Returns:
- extrapolated parameters
-
getMass
protected double getMass(AbsoluteDate date)
Get the mass.- Specified by:
getMass
in classAbstractAnalyticalPropagator
- Parameters:
date
- target date for the orbit- Returns:
- mass mass
-
resetInitialState
public void resetInitialState(SpacecraftState state)
Try (and fail) to reset the initial state.This method always throws an exception, as ephemerides cannot be reset.
- Specified by:
resetInitialState
in interfacePropagator
- Overrides:
resetInitialState
in classAbstractPropagator
- Parameters:
state
- new initial state to consider
-
resetIntermediateState
protected void resetIntermediateState(SpacecraftState state, boolean forward)
Reset an intermediate state.- Specified by:
resetIntermediateState
in classAbstractAnalyticalPropagator
- Parameters:
state
- new intermediate state to considerforward
- if true, the intermediate state is valid for propagations after itself
-
getInitialState
public SpacecraftState getInitialState()
Get the propagator initial state.- Specified by:
getInitialState
in interfacePropagator
- Overrides:
getInitialState
in classAbstractPropagator
- Returns:
- initial state
-
isAdditionalStateManaged
public boolean isAdditionalStateManaged(String name)
Check if an additional state is managed.Managed states are states for which the propagators know how to compute its evolution. They correspond to additional states for which a
provider
has been registered by calling theaddAdditionalStateProvider
method.Additional states that are present in the
initial state
but have no evolution method registered are not considered as managed states. These unmanaged additional states are not lost during propagation, though. Their value are piecewise constant between state resets that may change them if some event handlerresetState
method is called at an event occurrence and happens to change the unmanaged additional state.- Specified by:
isAdditionalStateManaged
in interfacePropagator
- Overrides:
isAdditionalStateManaged
in classAbstractPropagator
- Parameters:
name
- name of the additional state- Returns:
- true if the additional state is managed
-
getManagedAdditionalStates
public String[] getManagedAdditionalStates()
Get all the names of all managed states.- Specified by:
getManagedAdditionalStates
in interfacePropagator
- Overrides:
getManagedAdditionalStates
in classAbstractPropagator
- Returns:
- names of all managed states
-
createHarvester
protected AbstractMatricesHarvester createHarvester(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
Create the harvester suitable for propagator.- Overrides:
createHarvester
in classAbstractPropagator
- Parameters:
stmName
- State Transition Matrix state nameinitialStm
- initial State Transition Matrix ∂Y/∂Y₀, if null (which is the most frequent case), assumed to be 6x6 identityinitialJacobianColumns
- initial columns of the Jacobians matrix with respect to parameters, if null or if some selected parameters are missing from the dictionary, the corresponding initial column is assumed to be 0- Returns:
- harvester to retrieve computed matrices during and after propagation
-
getStateInterpolator
public TimeInterpolator<SpacecraftState> getStateInterpolator()
Get state interpolator.- Returns:
- state interpolator
-
getCovarianceInterpolator
public Optional<TimeInterpolator<TimeStampedPair<Orbit,StateCovariance>>> getCovarianceInterpolator()
Get covariance interpolator.- Returns:
- optional covariance interpolator
- See Also:
Optional
-
-