T
- class type for the generic versionpublic class StopOnDecreasing<T extends EventDetector> extends Object implements EventHandler<T>
The implementation behavior is to continue
propagation when ascending and to
stop
propagation when descending.
EventHandler.Action
Constructor and Description |
---|
StopOnDecreasing() |
Modifier and Type | Method and Description |
---|---|
EventHandler.Action |
eventOccurred(SpacecraftState s,
T detector,
boolean increasing)
Handle a detection event and choose what to do next.
|
SpacecraftState |
resetState(T detector,
SpacecraftState oldState)
Reset the state prior to continue propagation.
|
public EventHandler.Action eventOccurred(SpacecraftState s, T detector, boolean increasing) throws OrekitException
The implementation behavior is to continue
propagation when ascending and to
stop
propagation when descending.
eventOccurred
in interface EventHandler<T extends EventDetector>
s
- the current state information : date, kinematics, attitudedetector
- the detector object calling this method (not used in the evaluation)increasing
- if true, the value of the switching function increases
when times increases around eventEventHandler.Action.STOP
or EventHandler.Action.CONTINUE
OrekitException
- if some specific error occurspublic SpacecraftState resetState(T detector, SpacecraftState oldState) throws OrekitException
This method is called after the step handler has returned and
before the next step is started, but only when EventHandler.eventOccurred(org.orekit.propagation.SpacecraftState, T, boolean)
has itself returned the EventHandler.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
EventHandler.eventOccurred(org.orekit.propagation.SpacecraftState, T, boolean)
never returns the EventHandler.Action.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.
resetState
in interface EventHandler<T extends EventDetector>
detector
- object with appropriate type that can be used in determining correct return stateoldState
- old stateOrekitException
- if the state cannot be resetedCopyright © 2002-2015 CS Systèmes d'information. All rights reserved.