Class AbstractPropagator
- java.lang.Object
-
- org.orekit.propagation.AbstractPropagator
-
- All Implemented Interfaces:
Propagator,PVCoordinatesProvider
- Direct Known Subclasses:
AbstractAnalyticalPropagator,AbstractIntegratedPropagator
public abstract class AbstractPropagator extends Object implements Propagator
Common handling ofPropagatormethods for analytical propagators.This abstract class allows to provide easily the full set of
Propagatormethods, including all propagation modes support and discrete events support for any simple propagation method.- Author:
- Luc Maisonobe
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.Propagator
DEFAULT_MASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPropagator()Build a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalStateProvider(AdditionalStateProvider provider)Add a set of user-specified state parameters to be computed along with the orbit propagation.protected AbstractMatricesHarvestercreateHarvester(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)Create the harvester suitable for propagator.List<AdditionalStateProvider>getAdditionalStateProviders()Get an unmodifiable list of providers for additional state.AttitudeProvidergetAttitudeProvider()Get attitude provider.FramegetFrame()Get the frame in which the orbit is propagated.protected AbstractMatricesHarvestergetHarvester()Get the harvester.SpacecraftStategetInitialState()Get the propagator initial state.String[]getManagedAdditionalStates()Get all the names of all managed states.StepHandlerMultiplexergetMultiplexer()Get the multiplexer holding all step handlers.TimeStampedPVCoordinatesgetPVCoordinates(AbsoluteDate date, Frame frame)Get thePVCoordinatesof the body in the selected frame.protected AbsoluteDategetStartDate()Get the start date.protected voidinitializeAdditionalStates(AbsoluteDate target)Initialize the additional state providers at the start of propagation.protected voidinitializePropagation()Initialize propagation.booleanisAdditionalStateManaged(String name)Check if an additional state is managed.SpacecraftStatepropagate(AbsoluteDate target)Propagate towards a target date.voidresetInitialState(SpacecraftState state)Reset the propagator initial state.voidsetAttitudeProvider(AttitudeProvider attitudeProvider)Set attitude provider.protected voidsetStartDate(AbsoluteDate startDate)Set a start date.MatricesHarvestersetupMatricesComputation(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)Set up computation of State Transition Matrix and Jacobians matrix with respect to parameters.protected voidstateChanged(SpacecraftState state)Notify about a state change.protected SpacecraftStateupdateAdditionalStates(SpacecraftState original)Update state by adding all additional states.protected SpacecraftStateupdateUnmanagedStates(SpacecraftState original)Update state by adding unmanaged states.-
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
addEventDetector, clearEventsDetectors, clearStepHandlers, getEphemerisGenerator, getEventsDetectors, propagate, setStepHandler, setStepHandler
-
Methods inherited from interface org.orekit.utils.PVCoordinatesProvider
getPosition
-
-
-
-
Method Detail
-
setStartDate
protected void setStartDate(AbsoluteDate startDate)
Set a start date.- Parameters:
startDate- start date
-
getStartDate
protected AbsoluteDate getStartDate()
Get the start date.- Returns:
- start date
-
getAttitudeProvider
public AttitudeProvider getAttitudeProvider()
Get attitude provider.- Specified by:
getAttitudeProviderin interfacePropagator- Returns:
- attitude provider
-
setAttitudeProvider
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.- Specified by:
setAttitudeProviderin interfacePropagator- Parameters:
attitudeProvider- attitude provider
-
getInitialState
public SpacecraftState getInitialState()
Get the propagator initial state.- Specified by:
getInitialStatein interfacePropagator- Returns:
- initial state
-
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:
getFramein interfacePropagator- Returns:
- frame in which the orbit is propagated
- See Also:
Propagator.resetInitialState(SpacecraftState)
-
resetInitialState
public void resetInitialState(SpacecraftState state)
Reset the propagator initial state.- Specified by:
resetInitialStatein interfacePropagator- Parameters:
state- new initial state to consider
-
getMultiplexer
public StepHandlerMultiplexer getMultiplexer()
Get the multiplexer holding all step handlers.- Specified by:
getMultiplexerin interfacePropagator- Returns:
- multiplexer holding all step handlers
-
addAdditionalStateProvider
public void addAdditionalStateProvider(AdditionalStateProvider provider)
Add a set of user-specified state parameters to be computed along with the orbit propagation.- Specified by:
addAdditionalStateProviderin interfacePropagator- Parameters:
provider- provider for additional state
-
getAdditionalStateProviders
public List<AdditionalStateProvider> getAdditionalStateProviders()
Get an unmodifiable list of providers for additional state.- Specified by:
getAdditionalStateProvidersin interfacePropagator- Returns:
- providers for the additional states
-
setupMatricesComputation
public 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.
- Specified by:
setupMatricesComputationin interfacePropagator- 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
-
createHarvester
protected AbstractMatricesHarvester createHarvester(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
Create the harvester suitable for propagator.- 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
-
getHarvester
protected AbstractMatricesHarvester getHarvester()
Get the harvester.- Returns:
- harvester, or null if it was not created
- Since:
- 11.1
-
updateUnmanagedStates
protected SpacecraftState updateUnmanagedStates(SpacecraftState original)
Update state by adding unmanaged states.- Parameters:
original- original state- Returns:
- updated state, with unmanaged states included
- See Also:
updateAdditionalStates(SpacecraftState)
-
updateAdditionalStates
protected SpacecraftState updateAdditionalStates(SpacecraftState original)
Update state by adding all additional states.- Parameters:
original- original state- Returns:
- updated state, with all additional states included
(including
unmanagedstates) - See Also:
addAdditionalStateProvider(AdditionalStateProvider),updateUnmanagedStates(SpacecraftState)
-
initializeAdditionalStates
protected void initializeAdditionalStates(AbsoluteDate target)
Initialize the additional state providers at the start of propagation.- Parameters:
target- date of propagation. Not equal toinitialState.getDate().- Since:
- 11.2
-
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
providerhas been registered by calling theaddAdditionalStateProvidermethod.Additional states that are present in the
initial statebut 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 handlerresetStatemethod is called at an event occurrence and happens to change the unmanaged additional state.- Specified by:
isAdditionalStateManagedin interfacePropagator- 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:
getManagedAdditionalStatesin interfacePropagator- Returns:
- names of all managed states
-
propagate
public 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.
- Specified by:
propagatein interfacePropagator- Parameters:
target- target date towards which orbit state should be propagated- Returns:
- propagated state
-
getPVCoordinates
public 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)
-
initializePropagation
protected void initializePropagation()
Initialize propagation.- Since:
- 10.1
-
stateChanged
protected void stateChanged(SpacecraftState state)
Notify about a state change.- Parameters:
state- new state
-
-