D
- class type for the generic versionpublic class FieldEventState<D extends FieldEventDetector<T>,T extends RealFieldElement<T>> extends Object
event detector
during integration steps.
This class is heavily based on the class with the same name from the
Hipparchus library. The changes performed consist in replacing
raw types (double and double arrays) with space dynamics types
(FieldAbsoluteDate
, FieldSpacecraftState
).
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).
Modifier and Type | Class | Description |
---|---|---|
static class |
FieldEventState.EventOccurrence<T extends RealFieldElement<T>> |
Class to hold the data related to an event occurrence that is needed to decide how
to modify integration.
|
Constructor | Description |
---|---|
FieldEventState(D detector) |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
FieldEventState.EventOccurrence<T> |
doEvent(FieldSpacecraftState<T> state) |
Notify the user's listener of the event.
|
boolean |
evaluateStep(FieldOrekitStepInterpolator<T> interpolator) |
Evaluate the impact of the proposed step on the event detector.
|
FieldAbsoluteDate<T> |
getEventDate() |
Get the occurrence time of the event triggered in the current
step.
|
D |
getEventDetector() |
Get the underlying event detector.
|
boolean |
getPendingEvent() |
Get PendingEvent.
|
void |
init(FieldSpacecraftState<T> s0,
FieldAbsoluteDate<T> t) |
Initialize event handler at the start of a propagation.
|
void |
reinitializeBegin(FieldOrekitStepInterpolator<T> interpolator) |
Reinitialize the beginning of the step.
|
boolean |
tryAdvance(FieldSpacecraftState<T> state,
FieldOrekitStepInterpolator<T> interpolator) |
Try to accept the current history up to the given time.
|
public FieldEventState(D detector)
detector
- monitored event detectorpublic D getEventDetector()
public void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t) throws OrekitException
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 integrationOrekitException
- if some specific error occurspublic void reinitializeBegin(FieldOrekitStepInterpolator<T> interpolator) throws OrekitException
interpolator
- interpolator valid for the current stepOrekitException
- if the event detector
value cannot be evaluated at the beginning of the steppublic boolean evaluateStep(FieldOrekitStepInterpolator<T> interpolator) throws OrekitException, MathRuntimeException
interpolator
- step interpolator for the proposed stepOrekitException
- if the switching function
cannot be evaluatedMathRuntimeException
- if an event cannot be locatedpublic FieldAbsoluteDate<T> getEventDate()
public boolean tryAdvance(FieldSpacecraftState<T> state, FieldOrekitStepInterpolator<T> interpolator) throws OrekitException
It is not necessary to call this method before calling doEvent(FieldSpacecraftState)
with the same state. It is necessary to call this
method before you call doEvent(FieldSpacecraftState)
on some other event
detector.
state
- to try to accept.interpolator
- to use to find the new root, if any.state
. In other words false
means continue
on while true
means stop and handle my event first.OrekitException
- if the g function throws onepublic FieldEventState.EventOccurrence<T> doEvent(FieldSpacecraftState<T> state) throws OrekitException
FieldEventDetector.resetState(FieldSpacecraftState)
if necessary.state
- the state at the time of the event. This must be at the same time as
the current value of getEventDate()
.FieldEventHandler.Action.RESET_STATE
. Otherwise
the new state is state
. The stop time indicates what time propagation should
stop if the action is FieldEventHandler.Action.STOP
.
This guarantees the integration will stop on or after the root, so that integration
may be restarted safely.OrekitException
- if the event detector throws onepublic boolean getPendingEvent()
Copyright © 2002-2018 CS Systèmes d'information. All rights reserved.