org.orekit.propagation.events
public abstract class AbstractDetector extends Object implements EventDetector
Propagator.addEventDetector(EventDetector)
,
Serialized FormEventDetector.Action
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_ITER
Default cmaximum number of iterations in the event time search.
|
static double |
DEFAULT_MAXCHECK
Default maximum checking interval (s).
|
static double |
DEFAULT_THRESHOLD
Default convergence threshold (s).
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractDetector(double maxCheck,
double threshold)
Deprecated.
as of 6.1, replaced with
AbstractDetector(double, double, int) |
protected |
AbstractDetector(double maxCheck,
double threshold,
int maxIter)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing)
Deprecated.
as of 6.1 replaced by
EventHandler.eventOccurred(SpacecraftState,
EventDetector, boolean) |
abstract 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.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
SpacecraftState |
resetState(SpacecraftState oldState)
Deprecated.
as of 6.1 replaced by
EventHandler.resetState(EventDetector, SpacecraftState) |
public static final double DEFAULT_MAXCHECK
public static final double DEFAULT_THRESHOLD
public static final int DEFAULT_MAX_ITER
@Deprecated protected AbstractDetector(double maxCheck, double threshold)
AbstractDetector(double, double, int)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)protected AbstractDetector(double maxCheck, double threshold, int maxIter)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchpublic 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.
init
in interface EventDetector
s0
- initial statet
- target time for the integration@Deprecated public abstract EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing) throws OrekitException
EventHandler.eventOccurred(SpacecraftState,
EventDetector, boolean)
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 EventDetector.Action.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
.
eventOccurred
in interface EventDetector
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)EventDetector.Action.STOP
, EventDetector.Action.RESET_STATE
,
EventDetector.Action.RESET_DERIVATIVES
or EventDetector.Action.CONTINUE
OrekitException
- if some specific error occurspublic abstract double g(SpacecraftState s) throws OrekitException
g
in interface EventDetector
s
- the current state information: date, kinematics, attitudeOrekitException
- if some specific error occurspublic double getMaxCheckInterval()
getMaxCheckInterval
in interface EventDetector
public int getMaxIterationCount()
getMaxIterationCount
in interface EventDetector
public double getThreshold()
getThreshold
in interface EventDetector
@Deprecated public SpacecraftState resetState(SpacecraftState oldState) throws OrekitException
EventHandler.resetState(EventDetector, SpacecraftState)
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 EventDetector.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 EventDetector.Action.RESET_STATE
indicator, this function will never be called, and it is safe to simply return null.
resetState
in interface EventDetector
oldState
- old stateOrekitException
- if the state cannot be resetedCopyright © 2002–2015 CS Syst?mes d'Information. All rights reserved.