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:
  • Constructor Details

    • RecallLastOccurrence

      public RecallLastOccurrence(EventHandler wrappedHandler)
      Constructor.
      Parameters:
      wrappedHandler - event handler to wrap
  • Method Details

    • getLastOccurrence

      public AbsoluteDate getLastOccurrence()
      Getter for last occurrence.
      Returns:
      last date when underlying event was detected
    • getOriginalHandler

      public EventHandler getOriginalHandler()
      Description copied from interface: EventHandlerModifier
      Getter for the original event handler.
      Specified by:
      getOriginalHandler in interface EventHandlerModifier
      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:
      init in interface EventHandler
      Specified by:
      init in interface EventHandlerModifier
      Parameters:
      initialState - initial state
      target - target date for the propagation
      detector - event detector related to the event handler
    • eventOccurred

      public Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
      Handle an event.
      Specified by:
      eventOccurred in interface EventHandler
      Specified by:
      eventOccurred in interface EventHandlerModifier
      Parameters:
      s - SpaceCraft state to be used in the evaluation
      detector - object with appropriate type that can be used in determining correct return state
      increasing - 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