Class StepHandlerMultiplexer

java.lang.Object
org.orekit.propagation.sampling.StepHandlerMultiplexer
All Implemented Interfaces:
OrekitStepHandler

public class StepHandlerMultiplexer extends Object implements OrekitStepHandler
This class gathers several OrekitStepHandler instances into one.
Author:
Luc Maisonobe
  • Constructor Details

    • StepHandlerMultiplexer

      public StepHandlerMultiplexer()
      Simple constructor.
  • Method Details

    • add

      public void add(OrekitStepHandler handler)
      Add a handler for variable size step.

      If propagation is ongoing (i.e. global init already called and global finish not called yet), then the local OrekitStepHandler.init method of the added handler will be called with the last known state, so the handler starts properly.

      Parameters:
      handler - step handler to add
    • add

      public void add(double h, OrekitFixedStepHandler handler)
      Add a handler for fixed size step.

      If propagation is ongoing (i.e. global init already called and global finish not called yet), then the local OrekitFixedStepHandler.init method of the added handler will be called with the last known state, so the handler starts properly.

      Parameters:
      h - fixed stepsize (s)
      handler - handler called at the end of each finalized step
      Since:
      11.0
    • getHandlers

      public List<OrekitStepHandler> getHandlers()
      Get an unmodifiable view of all handlers.

      Note that if fixed step handlers have been add(double, OrekitFixedStepHandler), then they will show up wrapped within step normalizers.

      Returns:
      an unmodifiable view of all handlers
      Since:
      11.0
    • remove

      public void remove(OrekitStepHandler handler)
      Remove a handler.

      If propagation is ongoing (i.e. global init already called and global finish not called yet), then the local OrekitStepHandler.finish method of the removed handler will be called with the last known state, so the handler stops properly.

      Parameters:
      handler - step handler to remove
      Since:
      11.0
    • remove

      public void remove(OrekitFixedStepHandler handler)
      Remove a handler.

      If propagation is ongoing (i.e. global init already called and global finish not called yet), then the local OrekitFixedStepHandler.finish method of the removed handler will be called with the last known state, so the handler stops properly.

      Parameters:
      handler - step handler to remove
      Since:
      11.0
    • clear

      public void clear()
      Remove all handlers managed by this multiplexer.

      If propagation is ongoing (i.e. global init already called and global finish not called yet), then the local OrekitStepHandler.finish and OrekitFixedStepHandler.finish methods of the removed handlers will be called with the last known state, so the handlers stop properly.

      Since:
      11.0
    • init

      public void init(SpacecraftState s0, AbsoluteDate t)
      Initialize step handler at the start of a propagation.

      This method is called once at the start of the propagation. It may be used by the step handler to initialize some internal data if needed.

      The default method does nothing

      Specified by:
      init in interface OrekitStepHandler
      Parameters:
      s0 - initial state
      t - target time for the integration
    • handleStep

      public void handleStep(OrekitStepInterpolator interpolator)
      Handle the current step.
      Specified by:
      handleStep in interface OrekitStepHandler
      Parameters:
      interpolator - interpolator set up for the current step
    • finish

      public void finish(SpacecraftState finalState)
      Finalize propagation.
      Specified by:
      finish in interface OrekitStepHandler
      Parameters:
      finalState - state at propagation end