Interface EventHandler

All Known Subinterfaces:
EventHandlerModifier
All Known Implementing Classes:
AbstractManeuverTriggers.TriggerHandler, AttitudesSequence.Switch, AttitudesSwitcher.InstantaneousSwitch, ContinueOnEvent, CountAndContinue, CountingHandler, EventMultipleHandler, RecallLastOccurrence, RecordAndContinue, ResetDerivativesOnEvent, SecondaryEventLogger, StopOnDecreasing, StopOnEvent, StopOnIncreasing

public interface EventHandler
An interface defining how to handle events occurring during propagation.
Since:
6.1
Author:
Hank Grabowski
  • Method Details

    • init

      default 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

      Parameters:
      initialState - initial state
      target - target date for the propagation
      detector - event detector related to the event handler
    • eventOccurred

      Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
      Handle an event.
      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
    • resetState

      default SpacecraftState resetState(EventDetector detector, SpacecraftState 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.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean) has itself returned the Action.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 the eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean) never returns the Action.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 state
      oldState - old state
      Returns:
      new state
    • finish

      default void finish(SpacecraftState finalState, EventDetector detector)
      This method finalizes the event handler's job.

      The default implementation does nothing

      Parameters:
      finalState - state at propagation end
      detector - event detector related to the event handler
      Since:
      12.2