public class PythonEventHandler<T extends EventDetector> extends Object implements EventHandler<T>
It mirrors the EventHandler
interface from
Apache Commons Math 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(SpacecraftState, 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.
EventHandler.Action
Constructor and Description |
---|
PythonEventHandler() |
Modifier and Type | Method and Description |
---|---|
EventHandler.Action |
eventOccurred(SpacecraftState s,
T detector,
boolean increasing)
eventOccurred method mirrors the same interface method as in
EventDetector
and its subclasses, but with an additional parameter that allows the calling
method to pass in an object from the detector which would have potential
additional data to allow the implementing class to determine the correct
return state. |
void |
finalize()
Part of JCC Python interface to object
|
void |
pythonDecRef()
Part of JCC Python interface to object
|
long |
pythonExtension()
Part of JCC Python interface to object
|
void |
pythonExtension(long pythonObject)
Part of JCC Python interface to object
|
SpacecraftState |
resetState(T detector,
SpacecraftState oldState)
Reset the state prior to continue propagation.
|
public void pythonExtension(long pythonObject)
public long pythonExtension()
public void finalize() throws Throwable
public void pythonDecRef()
public EventHandler.Action eventOccurred(SpacecraftState s, T detector, boolean increasing) throws OrekitException
EventDetector
and its subclasses, but with an additional parameter that allows the calling
method to pass in an object from the detector which would have potential
additional data to allow the implementing class to determine the correct
return state.eventOccurred
in interface EventHandler<T extends EventDetector>
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 occured in an "increasing" or "decreasing" slope directionOrekitException
- 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 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
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.