public abstract class AbstractPropagator extends Object implements Propagator
Propagator
methods for analytical propagators.
This abstract class allows to provide easily the full set of Propagator
methods, including all propagation modes support and discrete events support for
any simple propagation method.
DEFAULT_MASS
Modifier | Constructor and Description |
---|---|
protected |
AbstractPropagator()
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalStateProvider(AdditionalStateProvider provider)
Add a set of user-specified state parameters to be computed along with the orbit propagation.
|
protected AbstractMatricesHarvester |
createHarvester(String stmName,
RealMatrix initialStm,
DoubleArrayDictionary initialJacobianColumns)
Create the harvester suitable for propagator.
|
List<AdditionalStateProvider> |
getAdditionalStateProviders()
Get an unmodifiable list of providers for additional state.
|
AttitudeProvider |
getAttitudeProvider()
Get attitude provider.
|
Frame |
getFrame()
Get the frame in which the orbit is propagated.
|
protected AbstractMatricesHarvester |
getHarvester()
Get the harvester.
|
SpacecraftState |
getInitialState()
Get the propagator initial state.
|
String[] |
getManagedAdditionalStates()
Get all the names of all managed states.
|
StepHandlerMultiplexer |
getMultiplexer()
Get the multiplexer holding all step handlers.
|
TimeStampedPVCoordinates |
getPVCoordinates(AbsoluteDate date,
Frame frame)
Get the
PVCoordinates of the body in the selected frame. |
protected AbsoluteDate |
getStartDate()
Get the start date.
|
protected void |
initializeAdditionalStates(AbsoluteDate target)
Initialize the additional state providers at the start of propagation.
|
protected void |
initializePropagation()
Initialize propagation.
|
boolean |
isAdditionalStateManaged(String name)
Check if an additional state is managed.
|
SpacecraftState |
propagate(AbsoluteDate target)
Propagate towards a target date.
|
void |
resetInitialState(SpacecraftState state)
Reset the propagator initial state.
|
void |
setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.
|
protected void |
setStartDate(AbsoluteDate startDate)
Set a start date.
|
MatricesHarvester |
setupMatricesComputation(String stmName,
RealMatrix initialStm,
DoubleArrayDictionary initialJacobianColumns)
Set up computation of State Transition Matrix and Jacobians matrix with respect to parameters.
|
protected void |
stateChanged(SpacecraftState state)
Notify about a state change.
|
protected SpacecraftState |
updateAdditionalStates(SpacecraftState original)
Update state by adding all additional states.
|
protected SpacecraftState |
updateUnmanagedStates(SpacecraftState original)
Update state by adding unmanaged states.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEventDetector, clearEventsDetectors, clearStepHandlers, getDefaultLaw, getEphemerisGenerator, getEventsDetectors, propagate, setStepHandler, setStepHandler
protected void setStartDate(AbsoluteDate startDate)
startDate
- start dateprotected AbsoluteDate getStartDate()
public AttitudeProvider getAttitudeProvider()
getAttitudeProvider
in interface Propagator
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
setAttitudeProvider
in interface Propagator
attitudeProvider
- attitude providerpublic SpacecraftState getInitialState()
getInitialState
in interface Propagator
public Frame getFrame()
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.
getFrame
in interface Propagator
Propagator.resetInitialState(SpacecraftState)
public void resetInitialState(SpacecraftState state)
resetInitialState
in interface Propagator
state
- new initial state to considerpublic StepHandlerMultiplexer getMultiplexer()
getMultiplexer
in interface Propagator
public void addAdditionalStateProvider(AdditionalStateProvider provider)
addAdditionalStateProvider
in interface Propagator
provider
- provider for additional statepublic List<AdditionalStateProvider> getAdditionalStateProviders()
getAdditionalStateProviders
in interface Propagator
public MatricesHarvester setupMatricesComputation(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
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 type
and position angle
that will be used by the propagator.
The default implementation throws an exception as the method is not supported by all propagators.
setupMatricesComputation
in interface Propagator
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 0protected AbstractMatricesHarvester createHarvester(String stmName, RealMatrix initialStm, DoubleArrayDictionary initialJacobianColumns)
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 0protected AbstractMatricesHarvester getHarvester()
protected SpacecraftState updateUnmanagedStates(SpacecraftState original)
original
- original stateupdateAdditionalStates(SpacecraftState)
protected SpacecraftState updateAdditionalStates(SpacecraftState original)
original
- original stateunmanaged
states)addAdditionalStateProvider(AdditionalStateProvider)
,
updateUnmanagedStates(SpacecraftState)
protected void initializeAdditionalStates(AbsoluteDate target)
target
- date of propagation. Not equal to initialState.getDate()
.public boolean isAdditionalStateManaged(String name)
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 the
addAdditionalStateProvider
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 handler resetState
method is called at an event occurrence and happens
to change the unmanaged additional state.
isAdditionalStateManaged
in interface Propagator
name
- name of the additional statepublic String[] getManagedAdditionalStates()
getManagedAdditionalStates
in interface Propagator
public SpacecraftState propagate(AbsoluteDate target)
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.
propagate
in interface Propagator
target
- target date towards which orbit state should be propagatedpublic TimeStampedPVCoordinates getPVCoordinates(AbsoluteDate date, Frame frame)
PVCoordinates
of the body in the selected frame.getPVCoordinates
in interface PVCoordinatesProvider
date
- current dateframe
- the frame where to define the positionprotected void initializePropagation()
protected void stateChanged(SpacecraftState state)
state
- new stateCopyright © 2002-2022 CS GROUP. All rights reserved.