public interface FieldEventDetector<T extends RealFieldElement<T>>
It mirrors the FieldODEEventHandler
interface from
Hipparchus but provides a space-dynamics interface to the
methods.
Events detectors are a useful solution to meet the requirements of propagators concerning discrete conditions. The state of each event detector is queried by the integrator at each step. When the sign of the underlying g switching function changes, the step is rejected and reduced, in order to make sure the sign changes occur only at steps boundaries.
When step ends exactly at a switching function sign change, the corresponding
event is triggered, by calling the eventOccurred(FieldSpacecraftState, boolean)
method. The method can do whatever it needs with the event (logging it, performing
some processing, ignore it ...). The return value of the method will be used by
the propagator to stop or resume propagation, possibly changing the state vector.
Modifier and Type | Method and Description |
---|---|
Action |
eventOccurred(FieldSpacecraftState<T> s,
boolean increasing)
Handle the event.
|
T |
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.
|
T |
getMaxCheckInterval()
Get maximal time interval between switching function checks.
|
int |
getMaxIterationCount()
Get maximal number of iterations in the event time search.
|
T |
getThreshold()
Get the convergence threshold in the event time search.
|
default void |
init(FieldSpacecraftState<T> s0,
FieldAbsoluteDate<T> t)
Initialize event handler at the start of a propagation.
|
default FieldSpacecraftState<T> |
resetState(FieldSpacecraftState<T> oldState)
Reset the state prior to continue propagation.
|
default void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
The default implementation does nothing
s0
- initial statet
- target time for the integrationT g(FieldSpacecraftState<T> s)
s
- the current state information: date, kinematics, attitudeT getThreshold()
T getMaxCheckInterval()
int getMaxIterationCount()
Action eventOccurred(FieldSpacecraftState<T> s, boolean increasing)
s
- SpaceCraft state to be used in the evaluationincreasing
- with the event occurred in an "increasing" or "decreasing" slope directiondefault FieldSpacecraftState<T> resetState(FieldSpacecraftState<T> oldState)
This method is called after the step handler has returned and
before the next step is started, but only when eventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, boolean)
has itself returned the Action.RESET_STATE
indicator. It allows the user to reset the state for the next step,
without perturbing the step handler of the finishing step. If the
eventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, boolean)
never returns the Action.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.
The default implementation simply returns its argument.
oldState
- old stateCopyright © 2002-2020 CS GROUP. All rights reserved.