Class FieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.FieldAbstractPropagator<T>
-
- org.orekit.propagation.integration.FieldAbstractIntegratedPropagator<T>
-
- Type Parameters:
T- type of the field element
- All Implemented Interfaces:
FieldPropagator<T>,FieldPVCoordinatesProvider<T>
- Direct Known Subclasses:
FieldDSSTPropagator,FieldNumericalPropagator
public abstract class FieldAbstractIntegratedPropagator<T extends CalculusFieldElement<T>> extends FieldAbstractPropagator<T>
Common handling ofFieldPropagatormethods for both numerical and semi-analytical propagators.- Author:
- Luc Maisonobe
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFieldAbstractIntegratedPropagator.MainStateEquations<T extends CalculusFieldElement<T>>Differential equations for the main state (orbit, attitude and mass).
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.FieldPropagator
DEFAULT_MASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldAbstractIntegratedPropagator(Field<T> field, FieldODEIntegrator<T> integrator, PropagationType propagationType)Build a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalDerivativesProvider(FieldAdditionalDerivativesProvider<T> provider)Add a provider for user-specified state derivatives to be integrated along with the orbit propagation.<D extends FieldEventDetector<T>>
voidaddEventDetector(D detector)Add an event detector.protected voidafterIntegration()Method called just after integration.protected voidbeforeIntegration(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> tEnd)Method called just before integration.voidclearEphemerisGenerators()Clear the ephemeris generators.voidclearEventsDetectors()Remove all events detectors.protected abstract FieldStateMapper<T>createMapper(FieldAbsoluteDate<T> referenceDate, T mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame)Create a mapper between raw double components and spacecraft state. /** Simple constructor.List<FieldAdditionalDerivativesProvider<T>>getAdditionalDerivativesProviders()Get an unmodifiable list of providers for additional derivatives.intgetBasicDimension()Get state vector dimension without additional parameters.intgetCalls()Get the number of calls to the differential equations computation method.FieldEphemerisGenerator<T>getEphemerisGenerator()Set up an ephemeris generator that will monitor the propagation for building an ephemeris from it once completed.Collection<FieldEventDetector<T>>getEventDetectors()Get all the events detectors that have been added.protected AttitudeProvidergetFrozenAttitudeProvider()Getter for the frozen attitude provider, used for performance when possible.protected FieldSpacecraftState<T>getInitialIntegrationState()Get the initial state for integration.protected FieldODEIntegrator<T>getIntegrator()Get the integrator used by the propagator.StringgetIntegratorName()Get the integrator's name.protected abstract FieldAbstractIntegratedPropagator.MainStateEquations<T>getMainStateEquations(FieldODEIntegrator<T> integ)Get the differential equations to integrate (for main state only).String[]getManagedAdditionalData()Get all the names of all managed data.TgetMu()Get the central attraction coefficient μ.protected OrbitTypegetOrbitType()Get propagation parameter type.protected PositionAngleTypegetPositionAngleType()Get propagation parameter type.PropagationTypegetPropagationType()Get the propagation type.booleangetResetAtEnd()Getter for the resetting flag regarding initial state.protected AttitudeProviderinitializeAttitudeProviderForDerivatives()Method called when initializing the attitude provider used when evaluating derivatives.protected voidinitMapper(Field<T> field)Initialize the mapper.booleanisAdditionalDataManaged(String name)Check if an additional data is managed.protected PropagationTypeisMeanOrbit()Check if only the mean elements should be used in a semi-analytical propagation.FieldSpacecraftState<T>propagate(FieldAbsoluteDate<T> target)Propagate towards a target date.FieldSpacecraftState<T>propagate(FieldAbsoluteDate<T> tStart, FieldAbsoluteDate<T> tEnd)Propagate from a start date towards a target date.voidresetInitialState(FieldSpacecraftState<T> state, PropagationType stateType)Reset initial state with a given propagation type.voidsetAttitudeProvider(AttitudeProvider attitudeProvider)Set attitude provider.voidsetMu(T mu)Set the central attraction coefficient μ.protected voidsetOrbitType(OrbitType orbitType)Set propagation orbit type.protected voidsetPositionAngleType(PositionAngleType positionAngleType)Set position angle type.voidsetResetAtEnd(boolean resetAtEnd)Allow/disallow resetting the initial state at end of propagation.protected voidsetUpEventDetector(FieldODEIntegrator<T> integ, FieldEventDetector<T> detector)Wrap an Orekit event detector and register it to the integrator.protected voidsetUpUserEventDetectors()Set up all user defined event detectors.-
Methods inherited from class org.orekit.propagation.FieldAbstractPropagator
addAdditionalDataProvider, getAdditionalDataProviders, getAttitudeProvider, getField, getFrame, getInitialState, getMultiplexer, getStartDate, initializeAdditionalData, initializePropagation, removeAdditionalDataProvider, resetInitialState, setStartDate, stateChanged, updateAdditionalData, updateUnmanagedData
-
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
clearStepHandlers, getPosition, getPVCoordinates, getVelocity, setStepHandler, setStepHandler
-
-
-
-
Constructor Detail
-
FieldAbstractIntegratedPropagator
protected FieldAbstractIntegratedPropagator(Field<T> field, FieldODEIntegrator<T> integrator, PropagationType propagationType)
Build a new instance.- Parameters:
integrator- numerical integrator to use for propagation.propagationType- type of orbit to output (mean or osculating).field- Field used by default
-
-
Method Detail
-
setResetAtEnd
public void setResetAtEnd(boolean resetAtEnd)
Allow/disallow resetting the initial state at end of propagation.By default, at the end of the propagation, the propagator resets the initial state to the final state, thus allowing a new propagation to be started from there without recomputing the part already performed. Calling this method with
resetAtEndset to false changes prevents such reset.- Parameters:
resetAtEnd- if true, at end of each propagation, theinitial statewill be reset to the final state of the propagation, otherwise the initial state will be preserved- Since:
- 9.0
-
getResetAtEnd
public boolean getResetAtEnd()
Getter for the resetting flag regarding initial state.- Returns:
- resetting flag
- Since:
- 12.0
-
getFrozenAttitudeProvider
protected AttitudeProvider getFrozenAttitudeProvider()
Getter for the frozen attitude provider, used for performance when possible.- Returns:
- frozen attitude provider
- Since:
- 13.1
-
initializeAttitudeProviderForDerivatives
protected AttitudeProvider initializeAttitudeProviderForDerivatives()
Method called when initializing the attitude provider used when evaluating derivatives.- Returns:
- attitude provider for derivatives
-
initMapper
protected void initMapper(Field<T> field)
Initialize the mapper.- Parameters:
field- Field used by default
-
getIntegratorName
public String getIntegratorName()
Get the integrator's name.- Returns:
- name of underlying integrator
- Since:
- 12.0
-
setAttitudeProvider
public void setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.- Specified by:
setAttitudeProviderin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Overrides:
setAttitudeProviderin classFieldAbstractPropagator<T extends CalculusFieldElement<T>>- Parameters:
attitudeProvider- attitude provider
-
setOrbitType
protected void setOrbitType(OrbitType orbitType)
Set propagation orbit type.- Parameters:
orbitType- orbit type to use for propagation
-
getOrbitType
protected OrbitType getOrbitType()
Get propagation parameter type.- Returns:
- orbit type used for propagation
-
isMeanOrbit
protected PropagationType isMeanOrbit()
Check if only the mean elements should be used in a semi-analytical propagation.- Returns:
MEANif only mean elements have to be used orOSCULATINGif osculating elements have to be also used.
-
getPropagationType
public PropagationType getPropagationType()
Get the propagation type.- Returns:
- propagation type.
- Since:
- 11.3.2
-
setPositionAngleType
protected void setPositionAngleType(PositionAngleType positionAngleType)
Set position angle type.The position parameter type is meaningful only if
propagation orbit typesupport it. As an example, it is not meaningful for propagation inCartesianparameters.- Parameters:
positionAngleType- angle type to use for propagation
-
getPositionAngleType
protected PositionAngleType getPositionAngleType()
Get propagation parameter type.- Returns:
- angle type to use for propagation
-
setMu
public void setMu(T mu)
Set the central attraction coefficient μ.- Parameters:
mu- central attraction coefficient (m³/s²)
-
getMu
public T getMu()
Get the central attraction coefficient μ.- Returns:
- mu central attraction coefficient (m³/s²)
- See Also:
setMu(CalculusFieldElement)
-
getCalls
public int getCalls()
Get the number of calls to the differential equations computation method.The number of calls is reset each time the
propagate(FieldAbsoluteDate)method is called.- Returns:
- number of calls to the differential equations computation method
-
isAdditionalDataManaged
public 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 an
additional data providerhas been registered by calling theaddAdditionalDataProvidermethod. 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 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.- Specified by:
isAdditionalDataManagedin interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Overrides:
isAdditionalDataManagedin classFieldAbstractPropagator<T extends CalculusFieldElement<T>>- Parameters:
name- name of the additional data- Returns:
- true if the additional data is managed
-
getManagedAdditionalData
public String[] getManagedAdditionalData()
Get all the names of all managed data.- Specified by:
getManagedAdditionalDatain interfaceFieldPropagator<T extends CalculusFieldElement<T>>- Overrides:
getManagedAdditionalDatain classFieldAbstractPropagator<T extends CalculusFieldElement<T>>- Returns:
- names of all managed data
-
addAdditionalDerivativesProvider
public void addAdditionalDerivativesProvider(FieldAdditionalDerivativesProvider<T> provider)
Add a provider for user-specified state derivatives to be integrated along with the orbit propagation.- Parameters:
provider- provider for additional derivatives- Since:
- 11.1
- See Also:
FieldAbstractPropagator.addAdditionalDataProvider(FieldAdditionalDataProvider)
-
getAdditionalDerivativesProviders
public List<FieldAdditionalDerivativesProvider<T>> getAdditionalDerivativesProviders()
Get an unmodifiable list of providers for additional derivatives.- Returns:
- providers for additional derivatives
- Since:
- 11.1
-
addEventDetector
public <D extends FieldEventDetector<T>> void addEventDetector(D detector)
Add an event detector.- Type Parameters:
D- class type for the generic version- Parameters:
detector- event detector to add- See Also:
FieldPropagator.clearEventsDetectors(),FieldPropagator.getEventDetectors()
-
getEventDetectors
public Collection<FieldEventDetector<T>> getEventDetectors()
Get all the events detectors that have been added.- Returns:
- an unmodifiable collection of the added detectors
- See Also:
FieldPropagator.addEventDetector(FieldEventDetector),FieldPropagator.clearEventsDetectors()
-
clearEventsDetectors
public void clearEventsDetectors()
Remove all events detectors.
-
setUpUserEventDetectors
protected void setUpUserEventDetectors()
Set up all user defined event detectors.
-
setUpEventDetector
protected void setUpEventDetector(FieldODEIntegrator<T> integ, FieldEventDetector<T> detector)
Wrap an Orekit event detector and register it to the integrator.- Parameters:
integ- integrator into which event detector should be registereddetector- event detector to wrap
-
clearEphemerisGenerators
public void clearEphemerisGenerators()
Clear the ephemeris generators.- Since:
- 13.0
-
getEphemerisGenerator
public FieldEphemerisGenerator<T> 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:FieldEphemerisGenerator<T> generator = propagator.getEphemerisGenerator(); propagator.propagate(target); FieldBoundedPropagator<T> ephemeris = generator.getGeneratedEphemeris();
- Returns:
- ephemeris generator
-
createMapper
protected abstract FieldStateMapper<T> createMapper(FieldAbsoluteDate<T> referenceDate, T mu, OrbitType orbitType, PositionAngleType positionAngleType, AttitudeProvider attitudeProvider, Frame frame)
Create a mapper between raw double components and spacecraft state. /** Simple constructor.The position parameter type is meaningful only if
propagation orbit typesupport it. As an example, it is not meaningful for propagation inCartesianparameters.- Parameters:
referenceDate- reference datemu- central attraction coefficient (m³/s²)orbitType- orbit type to use for mappingpositionAngleType- angle type to use for propagationattitudeProvider- attitude providerframe- inertial frame- Returns:
- new mapper
-
getMainStateEquations
protected abstract FieldAbstractIntegratedPropagator.MainStateEquations<T> getMainStateEquations(FieldODEIntegrator<T> integ)
Get the differential equations to integrate (for main state only).- Parameters:
integ- numerical integrator to use for propagation.- Returns:
- differential equations for main state
-
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>>- Overrides:
propagatein classFieldAbstractPropagator<T extends CalculusFieldElement<T>>- Parameters:
target- target date towards which orbit state should be propagated- Returns:
- propagated state
-
propagate
public FieldSpacecraftState<T> propagate(FieldAbsoluteDate<T> tStart, FieldAbsoluteDate<T> tEnd)
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:
tStart- start date from which orbit state should be propagatedtEnd- target date to which orbit state should be propagated- Returns:
- propagated state
-
resetInitialState
public void resetInitialState(FieldSpacecraftState<T> state, PropagationType stateType)
Reset initial state with a given propagation type.By default this method returns the same as method resetInitialState(FieldSpacecraftState)
Its purpose is mostly to be derived in FieldDSSTPropagator
- Parameters:
state- new initial state to considerstateType- type of the new state (mean or osculating)- Since:
- 12.1.3
-
getInitialIntegrationState
protected FieldSpacecraftState<T> getInitialIntegrationState()
Get the initial state for integration.- Returns:
- initial state for integration
-
beforeIntegration
protected void beforeIntegration(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> tEnd)
Method called just before integration.The default implementation does nothing, it may be specialized in subclasses.
- Parameters:
initialState- initial statetEnd- target date at which state should be propagated
-
afterIntegration
protected void afterIntegration()
Method called just after integration.The default implementation does nothing, it may be specialized in subclasses.
-
getBasicDimension
public int getBasicDimension()
Get state vector dimension without additional parameters.- Returns:
- state vector dimension without additional parameters.
-
getIntegrator
protected FieldODEIntegrator<T> getIntegrator()
Get the integrator used by the propagator.- Returns:
- the integrator.
-
-