Class FieldRecallLastOccurrence<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.handlers.FieldRecallLastOccurrence<T>
-
- Type Parameters:
T- field type
- All Implemented Interfaces:
FieldEventHandler<T>,FieldEventHandlerModifier<T>
public class FieldRecallLastOccurrence<T extends CalculusFieldElement<T>> extends Object implements FieldEventHandlerModifier<T>
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:
RecallLastOccurrence
-
-
Constructor Summary
Constructors Constructor Description FieldRecallLastOccurrence(FieldEventHandler<T> wrappedHandler)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActioneventOccurred(FieldSpacecraftState<T> s, FieldEventDetector<T> detector, boolean increasing)Handle an event.FieldAbsoluteDate<T>getLastOccurrence()Getter for last occurrence.FieldEventHandler<T>getOriginalHandler()Getter for the original event handler.voidinit(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target, FieldEventDetector<T> 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.FieldEventHandlerModifier
finish, resetState
-
-
-
-
Constructor Detail
-
FieldRecallLastOccurrence
public FieldRecallLastOccurrence(FieldEventHandler<T> wrappedHandler)
Constructor.- Parameters:
wrappedHandler- event handler to wrap
-
-
Method Detail
-
getOriginalHandler
public FieldEventHandler<T> getOriginalHandler()
Description copied from interface:FieldEventHandlerModifierGetter for the original event handler.- Specified by:
getOriginalHandlerin interfaceFieldEventHandlerModifier<T extends CalculusFieldElement<T>>- Returns:
- underlying handler
-
getLastOccurrence
public FieldAbsoluteDate<T> getLastOccurrence()
Getter for last occurrence.- Returns:
- last date when underlying event was detected
-
init
public 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>>- Specified by:
initin interfaceFieldEventHandlerModifier<T extends CalculusFieldElement<T>>- Parameters:
initialState- initial statetarget- target date for the propagationdetector- event detector related to the event handler
-
eventOccurred
public Action eventOccurred(FieldSpacecraftState<T> s, FieldEventDetector<T> detector, boolean increasing)
Handle an event.- Specified by:
eventOccurredin interfaceFieldEventHandler<T extends CalculusFieldElement<T>>- Specified by:
eventOccurredin interfaceFieldEventHandlerModifier<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
-
-