public abstract class FieldAbstractIntegratedPropagator<T extends RealFieldElement<T>> extends FieldAbstractPropagator<T>
FieldPropagator
methods for both numerical and semi-analytical propagators.Modifier and Type | Class and Description |
---|---|
static interface |
FieldAbstractIntegratedPropagator.MainStateEquations<T extends RealFieldElement<T>>
Differential equations for the main state (orbit, attitude and mass).
|
DEFAULT_LAW, DEFAULT_MASS, EPHEMERIS_GENERATION_MODE, MASTER_MODE, SLAVE_MODE
Modifier | Constructor and Description |
---|---|
protected |
FieldAbstractIntegratedPropagator(Field<T> field,
FieldODEIntegrator<T> integrator,
PropagationType propagationType)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalEquations(FieldAdditionalEquations<T> additional)
Add a set of user-specified equations to be integrated along with the orbit propagation.
|
<D extends FieldEventDetector<T>> |
addEventDetector(D detector)
Add an event detector.
|
protected void |
afterIntegration()
Method called just after integration.
|
protected void |
beforeIntegration(FieldSpacecraftState<T> initialState,
FieldAbsoluteDate<T> tEnd)
Method called just before integration.
|
void |
clearEventsDetectors()
Remove all events detectors.
|
protected abstract FieldStateMapper<T> |
createMapper(FieldAbsoluteDate<T> referenceDate,
T mu,
OrbitType orbitType,
PositionAngle positionAngleType,
AttitudeProvider attitudeProvider,
Frame frame)
Create a mapper between raw double components and spacecraft state.
|
int |
getBasicDimension()
Get state vector dimension without additional parameters.
|
int |
getCalls()
Get the number of calls to the differential equations computation method.
|
Collection<FieldEventDetector<T>> |
getEventsDetectors()
Get all the events detectors that have been added.
|
FieldBoundedPropagator<T> |
getGeneratedEphemeris()
Get the ephemeris generated during propagation.
|
protected FieldSpacecraftState<T> |
getInitialIntegrationState()
Get the initial state for integration.
|
protected FieldODEIntegrator<T> |
getIntegrator()
Get the integrator used by the propagator.
|
protected abstract FieldAbstractIntegratedPropagator.MainStateEquations<T> |
getMainStateEquations(FieldODEIntegrator<T> integ)
Get the differential equations to integrate (for main state only).
|
String[] |
getManagedAdditionalStates()
Get all the names of all managed states.
|
T |
getMu()
Get the central attraction coefficient μ.
|
protected OrbitType |
getOrbitType()
Get propagation parameter type.
|
protected PositionAngle |
getPositionAngleType()
Get propagation parameter type.
|
protected void |
initMapper(Field<T> field)
Initialize the mapper.
|
boolean |
isAdditionalStateManaged(String name)
Check if an additional state is managed.
|
protected PropagationType |
isMeanOrbit()
Check if only the mean elements should be used in a semianalitical propagation.
|
FieldSpacecraftState<T> |
propagate(FieldAbsoluteDate<T> target)
Propagate towards a target date.
|
protected FieldSpacecraftState<T> |
propagate(FieldAbsoluteDate<T> tEnd,
boolean activateHandlers)
Propagation with or without event detection.
|
FieldSpacecraftState<T> |
propagate(FieldAbsoluteDate<T> tStart,
FieldAbsoluteDate<T> tEnd)
Propagate from a start date towards a target date.
|
void |
setAttitudeProvider(AttitudeProvider attitudeProvider)
Set attitude provider.
|
void |
setEphemerisMode()
Set the propagator to ephemeris generation mode.
|
void |
setMasterMode(FieldOrekitStepHandler<T> handler)
Set the propagator to master mode with variable steps.
|
void |
setMu(T mu)
Set the central attraction coefficient μ.
|
protected void |
setOrbitType(OrbitType orbitType)
Set propagation orbit type.
|
protected void |
setPositionAngleType(PositionAngle positionAngleType)
Set position angle type.
|
void |
setResetAtEnd(boolean resetAtEnd)
Allow/disallow resetting the initial state at end of propagation.
|
void |
setSlaveMode()
Set the propagator to slave mode.
|
protected void |
setUpEventDetector(FieldODEIntegrator<T> integ,
FieldEventDetector<T> detector)
Wrap an Orekit event detector and register it to the integrator.
|
protected void |
setUpUserEventDetectors()
Set up all user defined event detectors.
|
addAdditionalStateProvider, getAdditionalStateProviders, getAttitudeProvider, getField, getFixedStepSize, getFrame, getInitialState, getMode, getPVCoordinates, getStartDate, getStepHandler, initializePropagation, resetInitialState, setMasterMode, setStartDate, stateChanged, updateAdditionalStates
protected FieldAbstractIntegratedPropagator(Field<T> field, FieldODEIntegrator<T> integrator, PropagationType propagationType)
integrator
- numerical integrator to use for propagation.propagationType
- type of orbit to output (mean or osculating).field
- Field used by defaultpublic void setResetAtEnd(boolean resetAtEnd)
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 resetAtEnd
set
to false changes prevents such reset.
resetAtEnd
- if true, at end of each propagation, the initial state
will be reset to the final state of
the propagation, otherwise the initial state will be preservedprotected void initMapper(Field<T> field)
field
- Field used by defaultpublic void setAttitudeProvider(AttitudeProvider attitudeProvider)
setAttitudeProvider
in interface FieldPropagator<T extends RealFieldElement<T>>
setAttitudeProvider
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
attitudeProvider
- attitude providerprotected void setOrbitType(OrbitType orbitType)
orbitType
- orbit type to use for propagationprotected OrbitType getOrbitType()
protected PropagationType isMeanOrbit()
MEAN
if only mean elements have to be used or
OSCULATING
if osculating elements have to be also used.protected void setPositionAngleType(PositionAngle positionAngleType)
The position parameter type is meaningful only if propagation orbit type
support it. As an example, it is not meaningful for propagation
in Cartesian
parameters.
positionAngleType
- angle type to use for propagationprotected PositionAngle getPositionAngleType()
public void setMu(T mu)
mu
- central attraction coefficient (m³/s²)public T getMu()
setMu(RealFieldElement)
public int getCalls()
The number of calls is reset each time the propagate(FieldAbsoluteDate)
method is called.
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 an
additional state provider
has been registered
by calling the addAdditionalStateProvider
method. If the propagator is an integrator-based
propagator
, the states for which a set of additional equations
has
been registered by calling the addAdditionalEquations
method are also counted as managed additional states.
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 FieldPropagator<T extends RealFieldElement<T>>
isAdditionalStateManaged
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
name
- name of the additional statepublic String[] getManagedAdditionalStates()
getManagedAdditionalStates
in interface FieldPropagator<T extends RealFieldElement<T>>
getManagedAdditionalStates
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
public void addAdditionalEquations(FieldAdditionalEquations<T> additional)
additional
- additional equationspublic <D extends FieldEventDetector<T>> void addEventDetector(D detector)
addEventDetector
in interface FieldPropagator<T extends RealFieldElement<T>>
addEventDetector
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
D
- class type for the generic versiondetector
- event detector to addFieldPropagator.clearEventsDetectors()
,
FieldPropagator.getEventsDetectors()
public Collection<FieldEventDetector<T>> getEventsDetectors()
getEventsDetectors
in interface FieldPropagator<T extends RealFieldElement<T>>
getEventsDetectors
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
FieldPropagator.addEventDetector(FieldEventDetector)
,
FieldPropagator.clearEventsDetectors()
public void clearEventsDetectors()
clearEventsDetectors
in interface FieldPropagator<T extends RealFieldElement<T>>
clearEventsDetectors
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
FieldPropagator.addEventDetector(FieldEventDetector)
,
FieldPropagator.getEventsDetectors()
protected void setUpUserEventDetectors()
protected void setUpEventDetector(FieldODEIntegrator<T> integ, FieldEventDetector<T> detector)
integ
- integrator into which event detector should be registereddetector
- event detector to wrappublic void setSlaveMode()
This mode is used when the user needs only the final orbit at the target time. The (slave) propagator computes this result and return it to the calling (master) application, without any intermediate feedback.
This is the default mode.
Note that this method has the side effect of replacing the step handlers
of the underlying integrator set up in the constructor
. So if a specific
step handler is needed, it should be added after this method has been callled.
setSlaveMode
in interface FieldPropagator<T extends RealFieldElement<T>>
setSlaveMode
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
FieldPropagator.setMasterMode(RealFieldElement, FieldOrekitFixedStepHandler)
,
FieldPropagator.setMasterMode(FieldOrekitStepHandler)
,
FieldPropagator.setEphemerisMode()
,
FieldPropagator.getMode()
,
FieldPropagator.SLAVE_MODE
public void setMasterMode(FieldOrekitStepHandler<T> handler)
This mode is used when the user needs to have some custom function called at the end of each finalized step during integration. The (master) propagator integration loop calls the (slave) application callback methods at each finalized step.
Note that this method has the side effect of replacing the step handlers
of the underlying integrator set up in the constructor
. So if a specific
step handler is needed, it should be added after this method has been called.
setMasterMode
in interface FieldPropagator<T extends RealFieldElement<T>>
setMasterMode
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
handler
- handler called at the end of each finalized stepFieldPropagator.setSlaveMode()
,
FieldPropagator.setMasterMode(RealFieldElement, FieldOrekitFixedStepHandler)
,
FieldPropagator.setEphemerisMode()
,
FieldPropagator.getMode()
,
FieldPropagator.MASTER_MODE
public void setEphemerisMode()
This mode is used when the user needs random access to the orbit state at any time between the initial and target times, and in no sequential order. 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.
Beware that since this mode stores all intermediate results, it may be memory intensive for long integration ranges and high precision/short time steps.
Note that this method has the side effect of replacing the step handlers
of the underlying integrator set up in the constructor
. So if a specific
step handler is needed, it should be added after this method has been called.
setEphemerisMode
in interface FieldPropagator<T extends RealFieldElement<T>>
setEphemerisMode
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
FieldPropagator.getGeneratedEphemeris()
,
FieldPropagator.setSlaveMode()
,
FieldPropagator.setMasterMode(RealFieldElement, FieldOrekitFixedStepHandler)
,
FieldPropagator.setMasterMode(FieldOrekitStepHandler)
,
FieldPropagator.getMode()
,
FieldPropagator.EPHEMERIS_GENERATION_MODE
public FieldBoundedPropagator<T> getGeneratedEphemeris() throws IllegalStateException
getGeneratedEphemeris
in interface FieldPropagator<T extends RealFieldElement<T>>
getGeneratedEphemeris
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
IllegalStateException
- if the propagator was not set in ephemeris
generation mode before propagationFieldPropagator.setEphemerisMode()
protected abstract FieldStateMapper<T> createMapper(FieldAbsoluteDate<T> referenceDate, T mu, OrbitType orbitType, PositionAngle positionAngleType, AttitudeProvider attitudeProvider, Frame frame)
The position parameter type is meaningful only if propagation orbit type
support it. As an example, it is not meaningful for propagation
in Cartesian
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 frameprotected abstract FieldAbstractIntegratedPropagator.MainStateEquations<T> getMainStateEquations(FieldODEIntegrator<T> integ)
integ
- numerical integrator to use for propagation.public FieldSpacecraftState<T> propagate(FieldAbsoluteDate<T> 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 FieldPropagator<T extends RealFieldElement<T>>
propagate
in class FieldAbstractPropagator<T extends RealFieldElement<T>>
target
- target date towards which orbit state should be propagatedpublic FieldSpacecraftState<T> propagate(FieldAbsoluteDate<T> tStart, FieldAbsoluteDate<T> tEnd)
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.
tStart
- start date from which orbit state should be propagatedtEnd
- target date to which orbit state should be propagatedprotected FieldSpacecraftState<T> propagate(FieldAbsoluteDate<T> tEnd, boolean activateHandlers)
tEnd
- target date to which orbit should be propagatedactivateHandlers
- if true, step and event handlers should be activatedprotected FieldSpacecraftState<T> getInitialIntegrationState()
protected void beforeIntegration(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> tEnd)
The default implementation does nothing, it may be specialized in subclasses.
initialState
- initial statetEnd
- target date at which state should be propagatedprotected void afterIntegration()
The default implementation does nothing, it may be specialized in subclasses.
public int getBasicDimension()
protected FieldODEIntegrator<T> getIntegrator()
Copyright © 2002-2020 CS Group. All rights reserved.