public class EventMultipleHandler extends Object implements EventHandler
eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean)
) :
stop
> resetState
> resetDerivatives
> resetRevents
> continue
Constructor and Description |
---|
EventMultipleHandler()
Constructor with list initialisation.
|
Modifier and Type | Method and Description |
---|---|
EventMultipleHandler |
addHandler(EventHandler handler)
Add one handler to the managed handlers list.
|
EventMultipleHandler |
addHandlers(EventHandler... newHandlers)
Add several handlers to the managed handlers list.
|
org.hipparchus.ode.events.Action |
eventOccurred(SpacecraftState s,
EventDetector detector,
boolean increasing)
Handle an event.
|
List<EventHandler> |
getHandlers()
Retrieve managed handlers list.
|
void |
init(SpacecraftState initialState,
AbsoluteDate target,
EventDetector detector)
Initialize event handler at the start of a propagation.
|
SpacecraftState |
resetState(EventDetector detector,
SpacecraftState oldState)
Reset the state prior to continue propagation.
|
void |
setHandlers(List<EventHandler> newHandlers)
Change handlers list with user input.
|
public EventMultipleHandler()
public void init(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)
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
All handlers' init methods are successively called, the order method is the order in which handlers are added
init
in interface EventHandler
initialState
- initial statetarget
- target date for the propagationdetector
- event detector related to the event handlerpublic org.hipparchus.ode.events.Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
AbstractDetector
are successively called and Action from H1 can prevent
H2 from happening if H1 returned resetState
.
With the MultipleEventHandler class, when event E occurs, all methods eventOccurred
of Handlers H1, H2... from MultiEventHandler attributes are called, then Action is decided.eventOccurred
in interface EventHandler
s
- SpaceCraft state to be used in the evaluationdetector
- object with appropriate type that can be used in determining correct return stateincreasing
- with the event occurred in an "increasing" or "decreasing" slope directionpublic SpacecraftState resetState(EventDetector detector, SpacecraftState oldState)
All handlers that return resetState
when calling eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean)
are saved in resetStateHandlers. Their methods resetState are successively called.
The order for calling resetState methods is the order in which handlers are added.
resetState
in interface EventHandler
detector
- object with appropriate type that can be used in determining correct return stateoldState
- old statepublic EventMultipleHandler addHandler(EventHandler handler)
handler
- handler associated with D detector@SafeVarargs public final EventMultipleHandler addHandlers(EventHandler... newHandlers)
newHandlers
- handlers associated with D detectorpublic void setHandlers(List<EventHandler> newHandlers)
newHandlers
- new handlers list associated with D detectorpublic List<EventHandler> getHandlers()
Copyright © 2002-2023 CS GROUP. All rights reserved.