Interface FieldEventHandlerModifier<T extends CalculusFieldElement<T>>
-
- All Superinterfaces:
FieldEventHandler<T>
- All Known Implementing Classes:
FieldRecallLastOccurrence
public interface FieldEventHandlerModifier<T extends CalculusFieldElement<T>> extends FieldEventHandler<T>
An interface defining an event handler wrapping another one, possibly modifying the outputs or extracting information. By default, all methods delegate to the original handler.- Since:
- 14.0
- Author:
- Romain Serra
- See Also:
EventHandlerModifier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ActioneventOccurred(FieldSpacecraftState<T> s, FieldEventDetector<T> detector, boolean increasing)Handle an event.default voidfinish(FieldSpacecraftState<T> finalState, FieldEventDetector<T> detector)This method finalize event handler at the end of a propagation.FieldEventHandler<T>getOriginalHandler()Getter for the original event handler.default voidinit(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target, FieldEventDetector<T> detector)Initialize event handler at the start of a propagation.default FieldSpacecraftState<T>resetState(FieldEventDetector<T> detector, FieldSpacecraftState<T> oldState)Reset the state prior to continue propagation.
-
-
-
Method Detail
-
getOriginalHandler
FieldEventHandler<T> getOriginalHandler()
Getter for the original event handler.- Returns:
- underlying handler
-
init
default void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target, FieldEventDetector<T> 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:
initin interfaceFieldEventHandler<T extends CalculusFieldElement<T>>- Parameters:
initialState- initial statetarget- target date for the propagationdetector- event detector related to the event handler
-
eventOccurred
default Action eventOccurred(FieldSpacecraftState<T> s, FieldEventDetector<T> detector, boolean increasing)
Handle an event.- Specified by:
eventOccurredin interfaceFieldEventHandler<T extends CalculusFieldElement<T>>- 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(FieldEventDetector<T> 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
FieldEventHandler.eventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, org.orekit.propagation.events.FieldEventDetector<T>, boolean)has itself returned theAction.RESET_STATEindicator. It allows the user to reset the state for the next step, without perturbing the step handler of the finishing step. If theFieldEventHandler.eventOccurred(org.orekit.propagation.FieldSpacecraftState<T>, org.orekit.propagation.events.FieldEventDetector<T>, boolean)never returns theAction.RESET_STATEindicator, this function will never be called, and it is safe to simply return null.The default implementation simply return its argument.
- Specified by:
resetStatein interfaceFieldEventHandler<T extends CalculusFieldElement<T>>- Parameters:
detector- object with appropriate type that can be used in determining correct return stateoldState- old state- Returns:
- new state
-
finish
default void finish(FieldSpacecraftState<T> finalState, FieldEventDetector<T> detector)
This method finalize event handler at the end of a propagation.The default implementation does nothing
- Specified by:
finishin interfaceFieldEventHandler<T extends CalculusFieldElement<T>>- Parameters:
finalState- state at propagation enddetector- event detector related to the event handler
-
-