Class RecallLastOccurrence
- java.lang.Object
-
- org.orekit.propagation.events.handlers.RecallLastOccurrence
-
- All Implemented Interfaces:
EventHandler,EventHandlerModifier
public class RecallLastOccurrence extends Object implements EventHandlerModifier
Event handler wrapping another, arbitrary one whilst remembering date of last detection. If never used, the cache is null. If used but nothing detected, it returns past infinity in case of forward propagation and future infinity otherwise.- Since:
- 12.1
- Author:
- Romain Serra
- See Also:
RecordAndContinue
-
-
Constructor Summary
Constructors Constructor Description RecallLastOccurrence(EventHandler wrappedHandler)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActioneventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)Handle an event.AbsoluteDategetLastOccurrence()Getter for last occurrence.EventHandlergetOriginalHandler()Getter for the original event handler.voidinit(SpacecraftState initialState, AbsoluteDate target, EventDetector detector)Initialize event handler at the start of a 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.EventHandlerModifier
finish, resetState
-
-
-
-
Constructor Detail
-
RecallLastOccurrence
public RecallLastOccurrence(EventHandler wrappedHandler)
Constructor.- Parameters:
wrappedHandler- event handler to wrap
-
-
Method Detail
-
getLastOccurrence
public AbsoluteDate getLastOccurrence()
Getter for last occurrence.- Returns:
- last date when underlying event was detected
-
getOriginalHandler
public EventHandler getOriginalHandler()
Description copied from interface:EventHandlerModifierGetter for the original event handler.- Specified by:
getOriginalHandlerin interfaceEventHandlerModifier- Returns:
- underlying handler
-
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:
initin interfaceEventHandler- Specified by:
initin interfaceEventHandlerModifier- 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)
Handle an event.- Specified by:
eventOccurredin interfaceEventHandler- Specified by:
eventOccurredin interfaceEventHandlerModifier- 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
-
-