Interface FieldEventHandler<KK extends FieldEventDetector<T>,T extends CalculusFieldElement<T>>
-
- Type Parameters:
KK
- object type that the handler is called from
- All Known Implementing Classes:
FieldContinueOnEvent
,FieldRecordAndContinue
,FieldStopOnDecreasing
,FieldStopOnEvent
,FieldStopOnIncreasing
,PythonFieldEventHandler
public interface FieldEventHandler<KK extends FieldEventDetector<T>,T extends CalculusFieldElement<T>>
An interface defining how to override event handling behavior in the standard propagator eventing classes without requiring subclassing. In cases where one wishes to use anonymous classes rather than explicit subclassing this allows for a more direct way to override the behavior. Event classes have to specifically support this capability.- Since:
- 6.1
- Author:
- Hank Grabowski
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Action
eventOccurred(FieldSpacecraftState<T> s, KK detector, boolean increasing)
eventOccurred method mirrors the same interface method as inEventDetector
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.default void
init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Deprecated.as of 11.1, replaced byinit(FieldSpacecraftState, FieldAbsoluteDate, FieldEventDetector)
default void
init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target, KK detector)
Initialize event handler at the start of a propagation.default FieldSpacecraftState<T>
resetState(KK detector, FieldSpacecraftState<T> oldState)
Reset the state prior to continue propagation.
-
-
-
Method Detail
-
init
default void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Deprecated.as of 11.1, replaced byinit(FieldSpacecraftState, FieldAbsoluteDate, FieldEventDetector)
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
- Parameters:
initialState
- initial statetarget
- target date for the propagation
-
init
default void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target, KK 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
- Parameters:
initialState
- initial statetarget
- target date for the propagationdetector
- event detector related to the event handler- Since:
- 11.1
-
eventOccurred
Action eventOccurred(FieldSpacecraftState<T> s, KK detector, boolean increasing)
eventOccurred method mirrors the same interface method as inEventDetector
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.- 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
default FieldSpacecraftState<T> resetState(KK detector, FieldSpacecraftState<T> 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
eventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, KK, 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 theeventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, KK, 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.
- Parameters:
detector
- object with appropriate type that can be used in determining correct return stateoldState
- old state- Returns:
- new state
-
-