|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.cnes.sirius.patrius.propagation.events.multi.MultiAbstractDetector
public abstract class MultiAbstractDetector
This class is copied from AbstractDetector
and adapted to
multi propagation.
Common parts shared by several events finders. A default implementation of most of the methods of
MultiEventDetector interface
. Make it easier to create a new detector.
MultiPropagator.addEventDetector(MultiEventDetector)
Field Summary | |
---|---|
static int |
DEFAULT_MAX_ITERATION_COUNT
Default maximal 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). |
Fields inherited from interface org.orekit.propagation.events.multi.MultiEventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Constructor Summary | |
---|---|
protected |
MultiAbstractDetector(double maxCheck,
double threshold)
Build a new instance. |
|
MultiAbstractDetector(int slopeSelection,
double maxCheck,
double threshold)
Build a new instance. |
Method Summary | |
---|---|
abstract EventDetector.Action |
eventOccurred(Map<String,SpacecraftState> s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next. |
abstract double |
g(Map<String,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. |
int |
getSlopeSelection()
Get the parameter in charge of the selection of detected events by the slope of the g-function. |
double |
getThreshold()
Get the convergence threshold in the event time search. |
void |
init(Map<String,SpacecraftState> s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation. |
Map<String,SpacecraftState> |
resetStates(Map<String,SpacecraftState> oldStates)
Reset the states (including additional states) prior to continue propagation. |
abstract boolean |
shouldBeRemoved()
This method is called after the step handler has returned and before the next step is started, but only when MultiEventDetector.eventOccurred(java.util.Map has been called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_MAXCHECK
public static final double DEFAULT_THRESHOLD
public static final int DEFAULT_MAX_ITERATION_COUNT
Constructor Detail |
---|
protected MultiAbstractDetector(double maxCheck, double threshold)
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)public MultiAbstractDetector(int slopeSelection, double maxCheck, double threshold)
slopeSelection
- g-function slope selection (0, 1, or 2)maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)Method Detail |
---|
public void init(Map<String,SpacecraftState> s0, AbsoluteDate t)
MultiEventDetector
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 MultiEventDetector
s0
- map of initial statest
- target time for the integrationpublic abstract double g(Map<String,SpacecraftState> s) throws OrekitException
MultiEventDetector
This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.
g
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitudes for forces
and events computation, and additional states for each states
OrekitException
- if some specific error occurspublic abstract EventDetector.Action eventOccurred(Map<String,SpacecraftState> s, boolean increasing, boolean forward) throws OrekitException
MultiEventDetector
The scheduling between this method and the MultiOrekitStepHandler method handleStep 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 MultiOrekitStepNormalizer 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 MultiEventDetector
interface and the MultiOrekitFixedStepHandler 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 MultiOrekitStepHandler and to the size of the fixed step for
MultiOrekitFixedStepHandler.
eventOccurred
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitude for forces
and events computation, and additional states for each statesincreasing
- 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)forward
- if true, the integration variable (time) increases during integration.
EventDetector.Action.STOP
,
EventDetector.Action.RESET_STATE
,
EventDetector.Action.RESET_DERIVATIVES
,
EventDetector.Action.CONTINUE
OrekitException
- if some specific error occurspublic abstract boolean shouldBeRemoved()
MultiEventDetector
This method is called after the step handler has returned and
before the next step is started, but only when MultiEventDetector.eventOccurred(java.util.Map
has been called.
shouldBeRemoved
in interface MultiEventDetector
public Map<String,SpacecraftState> resetStates(Map<String,SpacecraftState> oldStates) throws OrekitException
MultiEventDetector
This method is called after the step handler has returned and before the next step is started, but only when
MultiEventDetector.eventOccurred(java.util.Map
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 MultiEventDetector.eventOccurred(java.util.Map
never returns the EventDetector.Action.RESET_STATE
indicator, this function
will never be called, and it is safe to simply return null.
resetStates
in interface MultiEventDetector
oldStates
- old states
OrekitException
- if the states cannot be resetedpublic double getThreshold()
MultiEventDetector
getThreshold
in interface MultiEventDetector
public double getMaxCheckInterval()
MultiEventDetector
getMaxCheckInterval
in interface MultiEventDetector
public int getMaxIterationCount()
MultiEventDetector
getMaxIterationCount
in interface MultiEventDetector
public int getSlopeSelection()
MultiEventDetector
getSlopeSelection
in interface MultiEventDetector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |