|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EventDetector
This interface represents space-dynamics aware events detectors.
It mirrors the EventHandler interface from
commons-math but provides a space-dynamics interface to the methods.
Events detectors are a useful solution to meet the requirements of propagators concerning discrete conditions. The state of each event detector is queried by the integrator at each step. When the sign of the underlying g switching function changes, the step is rejected and reduced, in order to make sure the sign changes occur only at steps boundaries.
When step ends exactly at a switching function sign change, the corresponding
event is triggered, by calling the eventOccurred(SpacecraftState, boolean)
method. The method can do whatever it needs with the event (logging it, performing
some processing, ignore it ...). The return value of the method will be used by
the propagator to stop or resume propagation, possibly changing the state vector.
| Field Summary | |
|---|---|
static int |
CONTINUE
Continue indicator. |
static int |
RESET_DERIVATIVES
Reset derivatives indicator. |
static int |
RESET_STATE
Reset state indicator. |
static int |
STOP
Stop indicator. |
| Method Summary | |
|---|---|
int |
eventOccurred(SpacecraftState s,
boolean increasing)
Handle an event and choose what to do next. |
double |
g(SpacecraftState s)
Compute the value of the switching function. |
double |
getMaxCheckInterval()
Get maximal time interval between switching function checks. |
int |
getMaxIterationCount()
Get maximal number of iterations in the event time search. |
double |
getThreshold()
Get the convergence threshold in the event time search. |
SpacecraftState |
resetState(SpacecraftState oldState)
Reset the state prior to continue propagation. |
| Field Detail |
|---|
static final int STOP
This value should be used as the return value of the eventOccurred method when the propagation should be
stopped after the event ending the current step.
static final int RESET_STATE
This value should be used as the return value of the eventOccurred method when the propagation should
go on after the event ending the current step, with a new state
(which will be retrieved thanks to the resetState method).
static final int RESET_DERIVATIVES
This value should be used as the return value of the eventOccurred method when the propagation should
go on after the event ending the current step, with recomputed
derivatives vector.
static final int CONTINUE
This value should be used as the return value of the eventOccurred method when the propagation should go
on after the event ending the current step.
| Method Detail |
|---|
double g(SpacecraftState s)
throws OrekitException
s - the current state information: date, kinematics, attitude
OrekitException - if some specific error occurs
int eventOccurred(SpacecraftState s,
boolean increasing)
throws OrekitException
The scheduling between this method and the OrekitStepHandler method handleStep(interpolator, isLast) is to call this method first and
handleStep afterwards. This scheduling allows the propagator to
pass true as the isLast parameter to the step
handler to make it aware the step will be the last one if this method
returns STOP. As the interpolator may be used to navigate back
throughout the last step (as OrekitStepNormalizer
does for example), user code called by this method and user
code called by step handlers may experience apparently out of order values
of the independent time variable. As an example, if the same user object
implements both this EventDetector interface and the
OrekitFixedStepHandler
interface, a forward integration may call its
eventOccurred method with a state at 2000-01-01T00:00:10 first
and call its handleStep method with a state at 2000-01-01T00:00:09
afterwards. Such out of order calls are limited to the size of the
integration step for variable step handlers and
to the size of the fixed step for fixed step handlers.
s - the current state information : date, kinematics, attitudeincreasing - if true, the value of the switching function increases
when times increases around event (note that increase is measured with respect
to physical time, not with respect to propagation which may go backward in time)
STOP, RESET_STATE, RESET_DERIVATIVES
or CONTINUE
OrekitException - if some specific error occurs
SpacecraftState resetState(SpacecraftState oldState)
throws OrekitException
This method is called after the step handler has returned and
before the next step is started, but only when eventOccurred(org.orekit.propagation.SpacecraftState, boolean) has itself returned the RESET_STATE
indicator. It allows the user to reset the state for the next step,
without perturbing the step handler of the finishing step. If the
eventOccurred(org.orekit.propagation.SpacecraftState, boolean) never returns the RESET_STATE indicator,
this function will never be called, and it is safe to simply return null.
oldState - old state
OrekitException - if the state cannot be reseteddouble getThreshold()
double getMaxCheckInterval()
int getMaxIterationCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||