public class AltitudeDetector extends AbstractDetector
This class finds altitude events (i.e. satellite crossing a predefined altitude level above ground).
The default implementation behavior is to continue
propagation when ascending
and to stop
propagation when descending. This can be changed by using provided
constructors.
Propagator.addEventDetector(EventDetector)
,
Serialized FormEventDetector.Action
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
AltitudeDetector(double altitudeIn,
BodyShape bodyShapeIn)
Build a new altitude detector.
|
AltitudeDetector(double altitudeIn,
BodyShape bodyShapeIn,
double maxCheck)
Build a new altitude detector.
|
AltitudeDetector(double altitudeIn,
BodyShape bodyShapeIn,
double maxCheck,
double threshold)
Build a new altitude detector.
|
AltitudeDetector(double altitudeIn,
BodyShape bodyShapeIn,
double maxCheck,
double threshold,
EventDetector.Action ascending,
EventDetector.Action descending)
Build a new altitude detector.
|
AltitudeDetector(double altitudeIn,
BodyShape bodyShapeIn,
double maxCheck,
double threshold,
EventDetector.Action ascending,
EventDetector.Action descending,
boolean removeAscending,
boolean removeDescending)
Build a new altitude detector.
|
Modifier and Type | Method and Description |
---|---|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an altitude event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
double |
getAltitude()
Get the threshold altitude value.
|
BodyShape |
getBodyShape()
Get the body shape.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, resetState
public AltitudeDetector(double altitudeIn, BodyShape bodyShapeIn)
This simple constructor takes default values for maximal checking interval (AbstractDetector.DEFAULT_MAXCHECK
) and
convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).
The default implementation behavior is to continue
propagation when
ascending and to stop
propagation when descending.
altitudeIn
- threshold altitude valuebodyShapeIn
- body shape with respect to which altitude should be evaluatedpublic AltitudeDetector(double altitudeIn, BodyShape bodyShapeIn, double maxCheck)
This simple constructor takes default value for convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).
The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
The default implementation behavior is to continue
propagation when
ascending and to stop
propagation when descending.
altitudeIn
- threshold altitude value (m)bodyShapeIn
- body shape with respect to which altitude should be evaluatedmaxCheck
- maximal checking interval (s)public AltitudeDetector(double altitudeIn, BodyShape bodyShapeIn, double maxCheck, double threshold)
The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
The default implementation behavior is to continue
propagation when
ascending and to stop
propagation when descending.
altitudeIn
- threshold altitude value (m)bodyShapeIn
- body shape with respect to which altitude should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public AltitudeDetector(double altitudeIn, BodyShape bodyShapeIn, double maxCheck, double threshold, EventDetector.Action ascending, EventDetector.Action descending)
The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
altitudeIn
- threshold altitude value (m)bodyShapeIn
- body shape with respect to which altitude should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)ascending
- action performed when ascendingdescending
- action performed when descendingpublic AltitudeDetector(double altitudeIn, BodyShape bodyShapeIn, double maxCheck, double threshold, EventDetector.Action ascending, EventDetector.Action descending, boolean removeAscending, boolean removeDescending)
The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
altitudeIn
- threshold altitude value (m)bodyShapeIn
- body shape with respect to which altitude should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)ascending
- action performed when ascendingdescending
- action performed when descendingremoveAscending
- true if detector should be removed at ascending altitude detectionremoveDescending
- true if detector should be removed at descending altitude detectionpublic double getAltitude()
public BodyShape getBodyShape()
public boolean shouldBeRemoved()
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean)
has been triggered.
It returns true if the current detector should be removed after first event detection.
WARNING: this method can be called only once a event has been triggered. Before,
the value is not available.shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in class AbstractDetector
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
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 eventforward
- if true, the integration variable (time) increases during integration.PatriusException
- if some specific error occurspublic double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitudePatriusException
- if some specific error occursCopyright © 2017 CNES. All rights reserved.