Serializable, EventDetectorpublic class AdapterDetector extends Object implements EventDetector
This class is intended to be a base class for changing behaviour of a wrapped existing detector. This base class delegates all its methods to the wrapped detector. Classes extending it can therefore override only the methods they want to change.
| Constructor | Description |
|---|---|
AdapterDetector(EventDetector detector) |
Build an adaptor wrapping an existing detector.
|
| Modifier and Type | Method | Description |
|---|---|---|
EventHandler.Action |
eventOccurred(SpacecraftState s,
boolean increasing) |
Handle the event.
|
double |
g(SpacecraftState s) |
Compute the value of the switching function.
|
EventDetector |
getDetector() |
Get the wrapped detector.
|
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.
|
void |
init(SpacecraftState s0,
AbsoluteDate t) |
Initialize event handler at the start of a propagation.
|
SpacecraftState |
resetState(SpacecraftState oldState) |
Reset the state prior to continue propagation.
|
public AdapterDetector(EventDetector detector)
detector - detector to wrappublic EventDetector getDetector()
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.
The default implementation does nothing
init in interface EventDetectors0 - initial statet - target time for the integrationpublic double g(SpacecraftState s)
g in interface EventDetectors - the current state information: date, kinematics, attitudepublic double getThreshold()
getThreshold in interface EventDetectorpublic double getMaxCheckInterval()
getMaxCheckInterval in interface EventDetectorpublic int getMaxIterationCount()
getMaxIterationCount in interface EventDetectorpublic EventHandler.Action eventOccurred(SpacecraftState s, boolean increasing)
eventOccurred in interface EventDetectors - SpaceCraft state to be used in the evaluationincreasing - with the event occurred in an "increasing" or "decreasing" slope directionpublic SpacecraftState resetState(SpacecraftState oldState)
This method is called after the step handler has returned and
before the next step is started, but only when EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean) has itself returned the EventHandler.Action.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
EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean) never returns the EventHandler.Action.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.
The default implementation simply returns its argument.
resetState in interface EventDetectoroldState - old stateCopyright © 2002-2019 CS Systèmes d'information. All rights reserved.