T
- class type for the generic versionpublic class EventState<T extends EventDetector> extends Object implements Serializable
event detector
during integration steps.
This class is heavily based on the class with the same name from the
Apache Commons Math library. The changes performed consist in replacing
raw types (double and double arrays) with space dynamics types
(AbsoluteDate
, SpacecraftState
).
Each time the propagator proposes a step, the event detector should be checked. This class handles the state of one detector during one propagation step, with references to the state at the end of the preceding step. This information is used to determine if the detector should trigger an event or not during the proposed step (and hence the step should be reduced to ensure the event occurs at a bound rather than inside the step).
Constructor and Description |
---|
EventState(T detector)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluateStep(OrekitStepInterpolator interpolator)
Evaluate the impact of the proposed step on the event detector.
|
T |
getEventDetector()
Get the underlying event detector.
|
AbsoluteDate |
getEventTime()
Get the occurrence time of the event triggered in the current
step.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
void |
reinitializeBegin(SpacecraftState state0,
boolean isForward)
Reinitialize the beginning of the step.
|
SpacecraftState |
reset(SpacecraftState oldState)
Let the event detector reset the state if it wants.
|
void |
stepAccepted(SpacecraftState state)
Acknowledge the fact the step has been accepted by the propagator.
|
boolean |
stop()
Check if the propagation should be stopped at the end of the
current step.
|
public EventState(T detector)
detector
- monitored event detectorpublic T getEventDetector()
public void init(SpacecraftState s0, AbsoluteDate t)
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.
s0
- initial statet
- target time for the integrationpublic void reinitializeBegin(SpacecraftState state0, boolean isForward) throws OrekitException
state0
- state value at the beginning of the stepisForward
- if true, step will be forwardOrekitException
- if the event detector
value cannot be evaluated at the beginning of the steppublic boolean evaluateStep(OrekitStepInterpolator interpolator) throws OrekitException, TooManyEvaluationsException, NoBracketingException
interpolator
- step interpolator for the proposed stepOrekitException
- if the switching function
cannot be evaluatedTooManyEvaluationsException
- if an event cannot be locatedNoBracketingException
- if bracketing cannot be performedpublic AbsoluteDate getEventTime()
public void stepAccepted(SpacecraftState state) throws OrekitException
state
- value of the state vector at the end of the stepOrekitException
- if the value of the switching
function cannot be evaluatedpublic boolean stop()
public SpacecraftState reset(SpacecraftState oldState) throws OrekitException
oldState
- value of the state vector at the beginning of the next stepOrekitException
- if the state cannot be reset by the event
detectorCopyright © 2002-2015 CS Systèmes d'information. All rights reserved.