Class FieldStepHandlerMultiplexer<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.sampling.FieldStepHandlerMultiplexer<T>
-
- Type Parameters:
T
- type of the field elements
- All Implemented Interfaces:
FieldOrekitStepHandler<T>
public class FieldStepHandlerMultiplexer<T extends CalculusFieldElement<T>> extends Object implements FieldOrekitStepHandler<T>
This class gathers severalOrekitStepHandler
instances into one.- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description FieldStepHandlerMultiplexer()
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(FieldOrekitStepHandler<T> handler)
Add a handler for variable size step.void
add(T h, FieldOrekitFixedStepHandler<T> handler)
Add a handler for fixed size step.void
clear()
Remove all handlers managed by this multiplexer.void
finish(FieldSpacecraftState<T> finalState)
Finalize propagation.List<FieldOrekitStepHandler<T>>
getHandlers()
Get an unmodifiable view of all handlers.void
handleStep(FieldOrekitStepInterpolator<T> interpolator)
Handle the current step.void
init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
Initialize step handler at the start of a propagation.void
remove(FieldOrekitFixedStepHandler<T> handler)
Remove a handler.void
remove(FieldOrekitStepHandler<T> handler)
Remove a handler.
-
-
-
Method Detail
-
add
public void add(FieldOrekitStepHandler<T> handler)
Add a handler for variable size step.If propagation is ongoing (i.e. global
init
already called and globalfinish
not called yet), then the localFieldOrekitStepHandler.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(T h, FieldOrekitFixedStepHandler<T> handler)
Add a handler for fixed size step.If propagation is ongoing (i.e. global
init
already called and globalfinish
not called yet), then the localFieldOrekitStepHandler.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<FieldOrekitStepHandler<T>> getHandlers()
Get an unmodifiable view of all handlers.Note that if
fixed step handlers
have beenadd(CalculusFieldElement, FieldOrekitFixedStepHandler)
, then they will show up wrapped withinstep normalizers
.- Returns:
- an unmodifiable view of all handlers
- Since:
- 11.0
-
remove
public void remove(FieldOrekitStepHandler<T> handler)
Remove a handler.If propagation is ongoing (i.e. global
init
already called and globalfinish
not called yet), then the localFieldOrekitStepHandler.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(FieldOrekitFixedStepHandler<T> handler)
Remove a handler.If propagation is ongoing (i.e. global
init
already called and globalfinish
not called yet), then the localFieldOrekitFixedStepHandler.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 globalfinish
not called yet), then the localFieldOrekitStepHandler.finish
andFieldOrekitFixedStepHandler.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(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> 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.
- Specified by:
init
in interfaceFieldOrekitStepHandler<T extends CalculusFieldElement<T>>
- Parameters:
s0
- initial statet
- target time for the integration
-
handleStep
public void handleStep(FieldOrekitStepInterpolator<T> interpolator)
Handle the current step.- Specified by:
handleStep
in interfaceFieldOrekitStepHandler<T extends CalculusFieldElement<T>>
- Parameters:
interpolator
- interpolator set up for the current step
-
finish
public void finish(FieldSpacecraftState<T> finalState)
Finalize propagation.- Specified by:
finish
in interfaceFieldOrekitStepHandler<T extends CalculusFieldElement<T>>
- Parameters:
finalState
- state at propagation end
-
-