public class FieldStepHandlerMultiplexer<T extends CalculusFieldElement<T>> extends Object implements FieldOrekitStepHandler<T>
OrekitStepHandler
instances into one.Constructor and Description |
---|
FieldStepHandlerMultiplexer()
Simple constructor.
|
Modifier and Type | Method and 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.
|
public FieldStepHandlerMultiplexer()
public void add(FieldOrekitStepHandler<T> handler)
If propagation is ongoing (i.e. global init
already called and global finish
not called
yet), then the local FieldOrekitStepHandler.init
method of the added handler will be called with the last
known state, so the handler starts properly.
handler
- step handler to addpublic void add(T h, FieldOrekitFixedStepHandler<T> handler)
If propagation is ongoing (i.e. global init
already called and global finish
not called
yet), then the local FieldOrekitStepHandler.init
method of the added handler will be
called with the last known state, so the handler starts properly.
h
- fixed stepsize (s)handler
- handler called at the end of each finalized steppublic List<FieldOrekitStepHandler<T>> getHandlers()
Note that if fixed step handlers
have
been add(CalculusFieldElement, FieldOrekitFixedStepHandler)
, then they will
show up wrapped within step normalizers
.
public void remove(FieldOrekitStepHandler<T> handler)
If propagation is ongoing (i.e. global init
already called and global finish
not called
yet), then the local FieldOrekitStepHandler.finish
method of the removed handler will be called with the last
known state, so the handler stops properly.
handler
- step handler to removepublic void remove(FieldOrekitFixedStepHandler<T> handler)
If propagation is ongoing (i.e. global init
already called and global finish
not called
yet), then the local FieldOrekitFixedStepHandler.finish
method of the removed handler will be called with the last
known state, so the handler stops properly.
handler
- step handler to removepublic void clear()
If propagation is ongoing (i.e. global init
already called and global finish
not called
yet), then the local FieldOrekitStepHandler.finish
and FieldOrekitFixedStepHandler.finish
methods of the removed handlers will be called with the last
known state, so the handlers stop properly.
public void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
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.
init
in interface FieldOrekitStepHandler<T extends CalculusFieldElement<T>>
s0
- initial statet
- target time for the integrationpublic void handleStep(FieldOrekitStepInterpolator<T> interpolator)
handleStep
in interface FieldOrekitStepHandler<T extends CalculusFieldElement<T>>
interpolator
- interpolator set up for the current steppublic void finish(FieldSpacecraftState<T> finalState)
finish
in interface FieldOrekitStepHandler<T extends CalculusFieldElement<T>>
finalState
- state at propagation endCopyright © 2002-2023 CS GROUP. All rights reserved.