Class PythonEventHandler
- java.lang.Object
-
- org.orekit.propagation.events.handlers.PythonEventHandler
-
- All Implemented Interfaces:
EventHandler
public class PythonEventHandler extends Object implements EventHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected long
pythonObject
Part of JCC Python interface to object
-
Constructor Summary
Constructors Constructor Description PythonEventHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
Handle an event.void
finalize()
Part of JCC Python interface to objectvoid
init(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)
Initialize event handler at the start of a propagation.void
pythonDecRef()
Part of JCC Python interface to objectlong
pythonExtension()
Part of JCC Python interface to objectvoid
pythonExtension(long pythonObject)
Part of JCC Python interface to objectSpacecraftState
resetState(EventDetector detector, SpacecraftState oldState)
Reset the state prior to continue propagation.
-
-
-
Method Detail
-
pythonExtension
public void pythonExtension(long pythonObject)
Part of JCC Python interface to object
-
pythonExtension
public long pythonExtension()
Part of JCC Python interface to object
-
finalize
public void finalize() throws Throwable
Part of JCC Python interface to object
-
pythonDecRef
public void pythonDecRef()
Part of JCC Python interface to object
-
init
public void init(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)
Description copied from interface:EventHandler
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
-
eventOccurred
public Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
Description copied from interface:EventHandler
Handle an event.- Specified by:
eventOccurred
in interfaceEventHandler
- Parameters:
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 direction- Returns:
- the Action that the calling detector should pass back to the evaluation system
-
resetState
public SpacecraftState resetState(EventDetector detector, SpacecraftState oldState)
Description copied from interface:EventHandler
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
-
-