Class FieldAbstractPropagator<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.FieldAbstractPropagator<T>
-
- Type Parameters:
T- the type of the field elements
- All Implemented Interfaces:
FieldPropagator<T>,FieldPVCoordinatesProvider<T>
- Direct Known Subclasses:
FieldAbstractAnalyticalPropagator,FieldAbstractIntegratedPropagator
public abstract class FieldAbstractPropagator<T extends CalculusFieldElement<T>> extends Object implements FieldPropagator<T>
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.FieldPropagator
DEFAULT_MASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldAbstractPropagator(Field<T> field)Build a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalStateProvider(FieldAdditionalStateProvider<T> additionalStateProvider)Add a set of user-specified state parameters to be computed along with the orbit propagation.List<FieldAdditionalStateProvider<T>>getAdditionalStateProviders()Get an unmodifiable list of providers for additional state.AttitudeProvidergetAttitudeProvider()Get attitude provider.Field<T>getField()Field getter.FramegetFrame()Get the frame in which the orbit is propagated.FieldSpacecraftState<T>getInitialState()Get the propagator initial state.String[]getManagedAdditionalStates()Get all the names of all managed states.FieldStepHandlerMultiplexer<T>getMultiplexer()Get the multiplexer holding all step handlers.TimeStampedFieldPVCoordinates<T>getPVCoordinates(FieldAbsoluteDate<T> date, Frame frame)Get theFieldPVCoordinatesof the body in the selected frame.protected FieldAbsoluteDate<T>getStartDate()Get the start date.protected voidinitializeAdditionalStates(FieldAbsoluteDate<T> 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.FieldSpacecraftState<T>propagate(FieldAbsoluteDate<T> target)Propagate towards a target date.voidresetInitialState(FieldSpacecraftState<T> state)Reset the propagator initial state.voidsetAttitudeProvider(AttitudeProvider attitudeProvider)Set attitude provider.protected voidsetStartDate(FieldAbsoluteDate<T> startDate)Set a start date.protected voidstateChanged(FieldSpacecraftState<T> state)Notify about a state change.protected FieldSpacecraftState<T>updateAdditionalStates(FieldSpacecraftState<T> original)Update state by adding all additional states.protected FieldSpacecraftState<T>updateUnmanagedStates(FieldSpacecraftState<T> 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.FieldPropagator
addEventDetector, clearEventsDetectors, clearStepHandlers, getEphemerisGenerator, getEventsDetectors, propagate, setStepHandler, setStepHandler
-
Methods inherited from interface org.orekit.utils.FieldPVCoordinatesProvider
getPosition
-
-
-
-
Method Detail
-
setStartDate
protected void setStartDate(FieldAbsoluteDate<T> startDate)
Set a start date.- Parameters:
startDate- start date
-
getStartDate
protected FieldAbsoluteDate<T> getStartDate()
Get the start date.- Returns:
- start date
-
getAttitudeProvider
public AttitudeProvider getAttitudeProvider()
Get attitude provider.- Specified by:
getAttitudeProviderin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Returns:
- attitude provider
-
setAttitudeProvider
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.- Specified by:
setAttitudeProviderin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Parameters:
attitudeProvider- attitude provider
-
getInitialState
public FieldSpacecraftState<T> getInitialState()
Get the propagator initial state.- Specified by:
getInitialStatein interfaceFieldPropagator<T extends CalculusFieldElement<T>>- 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 interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Returns:
- frame in which the orbit is propagated
- See Also:
FieldPropagator.resetInitialState(FieldSpacecraftState)
-
resetInitialState
public void resetInitialState(FieldSpacecraftState<T> state)
Reset the propagator initial state.- Specified by:
resetInitialStatein interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Parameters:
state- new initial state to consider
-
getMultiplexer
public FieldStepHandlerMultiplexer<T> getMultiplexer()
Get the multiplexer holding all step handlers.- Specified by:
getMultiplexerin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Returns:
- multiplexer holding all step handlers
-
addAdditionalStateProvider
public void addAdditionalStateProvider(FieldAdditionalStateProvider<T> additionalStateProvider)
Add a set of user-specified state parameters to be computed along with the orbit propagation.- Specified by:
addAdditionalStateProviderin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Parameters:
additionalStateProvider- provider for additional state
-
getAdditionalStateProviders
public List<FieldAdditionalStateProvider<T>> getAdditionalStateProviders()
Get an unmodifiable list of providers for additional state.- Specified by:
getAdditionalStateProvidersin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Returns:
- providers for the additional states
-
updateUnmanagedStates
protected FieldSpacecraftState<T> updateUnmanagedStates(FieldSpacecraftState<T> original)
Update state by adding unmanaged states.- Parameters:
original- original state- Returns:
- updated state, with unmanaged states included
- See Also:
updateAdditionalStates(FieldSpacecraftState)
-
updateAdditionalStates
protected FieldSpacecraftState<T> updateAdditionalStates(FieldSpacecraftState<T> original)
Update state by adding all additional states.- Parameters:
original- original state- Returns:
- updated state, with all additional states included
- See Also:
addAdditionalStateProvider(FieldAdditionalStateProvider)
-
initializeAdditionalStates
protected void initializeAdditionalStates(FieldAbsoluteDate<T> 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 an
additional state providerhas been registered by calling theaddAdditionalStateProvidermethod. If the propagator is anintegrator-based propagator, the states for which a set ofadditional derivatives providerhas been registered by calling theaddAdditionalDerivativesProvidermethod are also counted as managed additional states.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 interfaceFieldPropagator<T extends CalculusFieldElement<T>>- 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 interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Returns:
- names of all managed states
-
propagate
public FieldSpacecraftState<T> propagate(FieldAbsoluteDate<T> 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 interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Parameters:
target- target date towards which orbit state should be propagated- Returns:
- propagated state
-
getPVCoordinates
public TimeStampedFieldPVCoordinates<T> getPVCoordinates(FieldAbsoluteDate<T> date, Frame frame)
Get theFieldPVCoordinatesof the body in the selected frame.- Specified by:
getPVCoordinatesin interfaceFieldPVCoordinatesProvider<T extends CalculusFieldElement<T>>- 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(FieldSpacecraftState<T> state)
Notify about a state change.- Parameters:
state- new state
-
-