org.orekit.propagation.events
T
- class type for the generic versionpublic abstract class AbstractReconfigurableDetector<T extends EventDetector> extends AbstractDetector
This class is only a temporary one introduced with Orekit 6.1 between the
legacy AbstractDetector
and all the Orekit provided detectors. It
will be removed in 7.0, when all its methods will be pushed up in the
hierarchy, with declarations at the EventDetector
interface level
and implementation at the AbstractDetector
abstract class level.
In other words, the methods will stay, but the intermediate class will
disappear.
EventDetector.Action
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Modifier | Constructor and Description |
---|---|
protected |
AbstractReconfigurableDetector(double maxCheck,
double threshold,
int maxIter,
EventHandler<T> handler)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
static EventHandler.Action |
convert(EventDetector.Action action)
Conversion between pre-6.1 EventDetector.Action and post-6.1 EventHandler.Action.
|
static EventDetector.Action |
convert(EventHandler.Action action)
Conversion between post 6.1 EventHandler.Action and pre-6.1 EventDetector.Action.
|
protected abstract T |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<T> newHandler)
Build a new instance.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing)
Deprecated.
as of 6.1 replaced by
EventHandler.eventOccurred(SpacecraftState, EventDetector, boolean) |
EventHandler<T> |
getHandler()
Get the handler.
|
SpacecraftState |
resetState(SpacecraftState oldState)
Deprecated.
as of 6.1 replaced by
EventHandler.resetState(EventDetector, SpacecraftState) |
T |
withHandler(EventHandler<T> newHandler)
Setup the event handler to call at event occurrences.
|
T |
withMaxCheck(double newMaxCheck)
Setup the maximum checking interval.
|
T |
withMaxIter(int newMaxIter)
Setup the maximum number of iterations in the event time search.
|
T |
withThreshold(double newThreshold)
Setup the convergence threshold.
|
g, getMaxCheckInterval, getMaxIterationCount, getThreshold, init
protected AbstractReconfigurableDetector(double maxCheck, double threshold, int maxIter, EventHandler<T> handler)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesprotected abstract T create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<T> newHandler)
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic T withMaxCheck(double newMaxCheck)
This will override a maximum checking interval if it has been configured previously.
newMaxCheck
- maximum checking interval (s)public T withMaxIter(int newMaxIter)
This will override a number of iterations if it has been configured previously.
newMaxIter
- maximum number of iterations in the event time searchpublic T withThreshold(double newThreshold)
This will override a convergence threshold if it has been configured previously.
newThreshold
- convergence threshold (s)public T withHandler(EventHandler<T> newHandler)
This will override a handler if it has been configured previously.
newHandler
- event handler to call at event occurrencespublic EventHandler<T> getHandler()
@Deprecated public 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
eventOccurred
in class AbstractDetector
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 static EventHandler.Action convert(EventDetector.Action action)
action
- action to convertpublic static EventDetector.Action convert(EventHandler.Action action)
action
- action to convert@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
resetState
in class AbstractDetector
oldState
- old stateOrekitException
- if the state cannot be resetedCopyright © 2002–2015 CS Syst?mes d'Information. All rights reserved.