Interface Propagator
-
- All Superinterfaces:
PVCoordinatesProvider
- All Known Subinterfaces:
BoundedPropagator
- All Known Implementing Classes:
AbstractAnalyticalPropagator,AbstractIntegratedPropagator,AbstractPropagator,AdapterPropagator,AggregateBoundedPropagator,BrouwerLyddanePropagator,DeepSDP4,DSSTPropagator,EcksteinHechlerPropagator,Ephemeris,EphemerisSegmentPropagator,GLONASSAnalyticalPropagator,GLONASSNumericalPropagator,GNSSPropagator,IntegratedEphemeris,IntelsatElevenElementsPropagator,KeplerianPropagator,NumericalPropagator,SBASPropagator,SGP4,TLEPropagator
public interface Propagator extends PVCoordinatesProvider
This interface provides a way to propagate an orbit at any time.This interface is the top-level abstraction for orbit propagation. It only allows propagation to a predefined date. It is implemented by analytical models which have no time limit, by orbit readers based on external data files, by numerical integrators using rich force models and by continuous models built after numerical integration has been completed and dense output data as been gathered.
Note that one single propagator cannot be called from multiple threads. Its configuration can be changed as there is at least a
resetInitialState(SpacecraftState)method, and even propagators that do not support resetting state (like theTLEPropagatordo cache some internal data during computation. However, as long as they are configured with independent building blocks (mainly event handlers and step handlers that may preserve some internal state), and as long as they are called from one thread only, they can be used in multi-threaded applications. Synchronizing several propagators to run in parallel is also possible usingPropagatorsParallelizer.- Author:
- Luc Maisonobe, Véronique Pommier-Maurussane
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_MASSDefault mass.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddAdditionalDataProvider(AdditionalDataProvider<?> additionalDataProvider)Add a set of user-specified data to be computed along with the orbit propagation.<T extends EventDetector>
voidaddEventDetector(T detector)Add an event detector.voidclearEventsDetectors()Remove all events detectors.default voidclearStepHandlers()Remove all step handlers.List<AdditionalDataProvider<?>>getAdditionalDataProviders()Get an unmodifiable list of providers for additional data.AttitudeProvidergetAttitudeProvider()Get attitude provider.static AttitudeProvidergetDefaultLaw(Frames frames)Get a default law using the given frames.EphemerisGeneratorgetEphemerisGenerator()Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.Collection<EventDetector>getEventDetectors()Get all the events detectors that have been added.FramegetFrame()Get the frame in which the orbit is propagated.SpacecraftStategetInitialState()Get the propagator initial state.String[]getManagedAdditionalData()Get all the names of all managed additional data.StepHandlerMultiplexergetMultiplexer()Get the multiplexer holding all step handlers.default Vector3DgetPosition(AbsoluteDate date, Frame frame)Get the position of the body in the selected frame.default TimeStampedPVCoordinatesgetPVCoordinates(AbsoluteDate date, Frame frame)Get thePVCoordinatesof the body in the selected frame.default Vector3DgetVelocity(AbsoluteDate date, Frame frame)Get the velocity of the body in the selected frame.booleanisAdditionalDataManaged(String name)Check if an additional data is managed.SpacecraftStatepropagate(AbsoluteDate target)Propagate towards a target date.SpacecraftStatepropagate(AbsoluteDate start, AbsoluteDate target)Propagate from a start date towards a target date.voidresetInitialState(SpacecraftState state)Reset the propagator initial state.voidsetAttitudeProvider(AttitudeProvider attitudeProvider)Set attitude provider.default voidsetStepHandler(double h, OrekitFixedStepHandler handler)Set a single handler for fixed stepsizes.default voidsetStepHandler(OrekitStepHandler handler)Set a single handler for variable stepsizes.default MatricesHarvestersetupMatricesComputation(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)Set up computation of State Transition Matrix and Jacobians matrix with respect to parameters.
-
-
-
Field Detail
-
DEFAULT_MASS
static final double DEFAULT_MASS
Default mass.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultLaw
static AttitudeProvider getDefaultLaw(Frames frames)
Get a default law using the given frames.- Parameters:
frames- the set of frames to use.- Returns:
- attitude law.
-
getMultiplexer
StepHandlerMultiplexer getMultiplexer()
Get the multiplexer holding all step handlers.- Returns:
- multiplexer holding all step handlers
- Since:
- 11.0
-
clearStepHandlers
default void clearStepHandlers()
Remove all step handlers.This convenience method is equivalent to call
getMultiplexer().clear()- Since:
- 11.0
- See Also:
getMultiplexer(),StepHandlerMultiplexer.clear()
-
setStepHandler
default void setStepHandler(double h, OrekitFixedStepHandler handler)Set a single handler for fixed stepsizes.This convenience method is equivalent to call
getMultiplexer().clear()followed bygetMultiplexer().add(h, handler)- Parameters:
h- fixed stepsize (s)handler- handler called at the end of each finalized step- Since:
- 11.0
- See Also:
getMultiplexer(),StepHandlerMultiplexer.add(double, OrekitFixedStepHandler)
-
setStepHandler
default void setStepHandler(OrekitStepHandler handler)
Set a single handler for variable stepsizes.This convenience method is equivalent to call
getMultiplexer().clear()followed bygetMultiplexer().add(handler)- Parameters:
handler- handler called at the end of each finalized step- Since:
- 11.0
- See Also:
getMultiplexer(),StepHandlerMultiplexer.add(OrekitStepHandler)
-
getEphemerisGenerator
EphemerisGenerator getEphemerisGenerator()
Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.This generator can be used when the user needs fast random access to the orbit state at any time between the initial and target times. A typical example is the implementation of search and iterative algorithms that may navigate forward and backward inside the propagation range before finding their result even if the propagator used is integration-based and only goes from one initial time to one target time.
Beware that when used with integration-based propagators, the generator will store all intermediate results. It is therefore memory intensive for long integration-based ranges and high precision/short time steps. When used with analytical propagators, the generator only stores start/stop time and a reference to the analytical propagator itself to call it back as needed, so it is less memory intensive.
The returned ephemeris generator will be initially empty, it will be filled with propagation data when a subsequent call to either
propagate(target)orpropagate(start, target)is called. The proper way to use this method is therefore to do:EphemerisGenerator generator = propagator.getEphemerisGenerator(); propagator.propagate(target); BoundedPropagator ephemeris = generator.getGeneratedEphemeris();
- Returns:
- ephemeris generator
-
getInitialState
SpacecraftState getInitialState()
Get the propagator initial state.- Returns:
- initial state
-
resetInitialState
void resetInitialState(SpacecraftState state)
Reset the propagator initial state.- Parameters:
state- new initial state to consider
-
addAdditionalDataProvider
void addAdditionalDataProvider(AdditionalDataProvider<?> additionalDataProvider)
Add a set of user-specified data to be computed along with the orbit propagation.- Parameters:
additionalDataProvider- provider for additional data
-
getAdditionalDataProviders
List<AdditionalDataProvider<?>> getAdditionalDataProviders()
Get an unmodifiable list of providers for additional data.- Returns:
- providers for the additional data
-
isAdditionalDataManaged
boolean isAdditionalDataManaged(String name)
Check if an additional data is managed.Managed data are the ones for which the propagators know how to compute its evolution. They correspond to additional data for which a
providerhas been registered by calling theaddAdditionalDataProvidermethod.Additional data that are present in the
initial statebut have no evolution method registered are not considered as managed data. These unmanaged additional data are not lost during propagation, though. Their value are piecewise constant between state resets that may change them if some event handlerresetStatemethod is called at an event occurrence and happens to change the unmanaged additional data.- Parameters:
name- name of the additional data- Returns:
- true if the additional data is managed
-
getManagedAdditionalData
String[] getManagedAdditionalData()
Get all the names of all managed additional data.- Returns:
- names of all managed additional data
-
addEventDetector
<T extends EventDetector> void addEventDetector(T detector)
Add an event detector.- Type Parameters:
T- class type for the generic version- Parameters:
detector- event detector to add- See Also:
clearEventsDetectors(),getEventDetectors()
-
getEventDetectors
Collection<EventDetector> getEventDetectors()
Get all the events detectors that have been added.- Returns:
- an unmodifiable collection of the added detectors
- See Also:
addEventDetector(EventDetector),clearEventsDetectors()
-
clearEventsDetectors
void clearEventsDetectors()
Remove all events detectors.
-
getAttitudeProvider
AttitudeProvider getAttitudeProvider()
Get attitude provider.- Returns:
- attitude provider
-
setAttitudeProvider
void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.- Parameters:
attitudeProvider- attitude provider
-
getFrame
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.
- Returns:
- frame in which the orbit is propagated
- See Also:
resetInitialState(SpacecraftState)
-
setupMatricesComputation
default MatricesHarvester setupMatricesComputation(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
Set up computation of State Transition Matrix and Jacobians matrix with respect to parameters.If this method is called, both State Transition Matrix and Jacobians with respect to the force models parameters that will be selected when propagation starts will be automatically computed, and the harvester will allow to retrieve them.
The arguments for initial matrices must be compatible with the
orbit typeandposition anglethat will be used by the propagator.The default implementation throws an exception as the method is not supported by all propagators.
- 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
- Since:
- 11.1
-
propagate
SpacecraftState propagate(AbsoluteDate target)
Propagate towards a target date.Simple propagators use only the target date as the specification for computing the propagated state. More feature rich propagators can consider other information and provide different operating modes or G-stop facilities to stop at pinpointed events occurrences. In these cases, the target date is only a hint, not a mandatory objective.
- Parameters:
target- target date towards which orbit state should be propagated- Returns:
- propagated state
-
propagate
SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target)
Propagate from a start date towards a target date.Those propagators use a start date and a target date to compute the propagated state. For propagators using event detection mechanism, if the provided start date is different from the initial state date, a first, simple propagation is performed, without processing any event computation. Then complete propagation is performed from start date to target date.
- Parameters:
start- start date from which orbit state should be propagatedtarget- target date to which orbit state should be propagated- Returns:
- propagated state
-
getPVCoordinates
default TimeStampedPVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame)
Get thePVCoordinatesof the body in the selected frame.- Specified by:
getPVCoordinatesin interfacePVCoordinatesProvider- Parameters:
date- current dateframe- the frame where to define the position- Returns:
- time-stamped position/velocity of the body (m and m/s)
-
getVelocity
default Vector3D getVelocity(AbsoluteDate date, Frame frame)
Get the velocity of the body in the selected frame.- Specified by:
getVelocityin interfacePVCoordinatesProvider- Parameters:
date- current dateframe- the frame where to define the velocity- Returns:
- velocity of the body (m/s)
-
getPosition
default Vector3D getPosition(AbsoluteDate date, Frame frame)
Get the position of the body in the selected frame.- Specified by:
getPositionin interfacePVCoordinatesProvider- Parameters:
date- current dateframe- the frame where to define the position- Returns:
- position of the body (m and)
-
-