Class AbstractManeuverTriggers.TriggerHandler
- java.lang.Object
-
- org.orekit.forces.maneuvers.trigger.AbstractManeuverTriggers.TriggerHandler
-
- All Implemented Interfaces:
EventHandler
- Enclosing class:
- AbstractManeuverTriggers
protected abstract class AbstractManeuverTriggers.TriggerHandler extends Object implements EventHandler
Local abstract handler for triggers, with a cache for the reset.- Since:
- 13.1
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TriggerHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Action
determineAction(EventDetector detector, SpacecraftState oldState)
Determines the action (reset state or derivatives only).void
init(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)
Initialize event handler at the start of a propagation.protected boolean
isForward()
Getter for flag.SpacecraftState
resetState(EventDetector detector, SpacecraftState oldState)
Reset the state prior to continue propagation.-
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.events.handlers.EventHandler
eventOccurred, finish
-
-
-
-
Method Detail
-
init
public void init(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)
Initialize event handler at the start of a propagation.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
- Specified by:
init
in interfaceEventHandler
- Parameters:
initialState
- initial statetarget
- target date for the propagationdetector
- event detector related to the event handler
-
determineAction
protected Action determineAction(EventDetector detector, SpacecraftState oldState)
Determines the action (reset state or derivatives only).- Parameters:
detector
- event detectoroldState
- state before reset if any- Returns:
- action
-
resetState
public SpacecraftState resetState(EventDetector detector, SpacecraftState oldState)
Reset the state prior to continue propagation.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, org.orekit.propagation.events.EventDetector, boolean)
has itself returned theAction.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 theEventHandler.eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean)
never returns theAction.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.The default implementation simply return its argument.
- Specified by:
resetState
in interfaceEventHandler
- Parameters:
detector
- object with appropriate type that can be used in determining correct return stateoldState
- old state- Returns:
- new state
-
isForward
protected boolean isForward()
Getter for flag.- Returns:
- flag on backward propagation
-
-