public class CombinedPhenomenaDetector extends AbstractDetector
This class finds the events resulting from the combination of two phenomena. Combinations of phenomena can be done
using the following boolean operators:
The default implementation behaviour is to
continue
propagation when combined
phnomena are detected. This can be changed by using one of the provided constructors.
EventDetector
,
Propagator.addEventDetector(EventDetector)
,
Serialized FormAbstractDetector.PropagationDelayType
EventDetector.Action
actionAtEntry, actionAtExit, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
CombinedPhenomenaDetector(EventDetector d1,
boolean d1IncreasingIsStart,
EventDetector d2,
boolean d2IncreasingIsStart,
boolean togetherIn)
Constructor for the detector of the combination of two phenomena.
|
CombinedPhenomenaDetector(EventDetector d1,
boolean d1IncreasingIsStart,
EventDetector d2,
boolean d2IncreasingIsStart,
boolean togetherIn,
EventDetector.Action action)
Constructor for the detector of the combination of two phenomena.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function for a combination (AND or OR) of two phenomena.
After computing the switching function of each detector and, if necessary, changing its sign to apply a general convention (g>0 if the phenomenon associated to an event is active), it returns one between the two g functions, according to the boolean operator. |
EventDetector |
getDetector1()
Returns first detector.
|
EventDetector |
getDetector2()
Returns second detector.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getActionAtEntry, getActionAtExit, getInertialFrame, getMaxCheckInterval, getMaxIterationCount, getPropagationDelayType, getSignalEmissionDate, getSignalReceptionDate, getSlopeSelection, getThreshold, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setEpsilonSignalPropagation, setMaxCheckInterval, setMaxIterSignalPropagation, setPropagationDelayType
public CombinedPhenomenaDetector(EventDetector d1, boolean d1IncreasingIsStart, EventDetector d2, boolean d2IncreasingIsStart, boolean togetherIn)
d1
- the first EventDetector
d1IncreasingIsStart
- true if increasing of the g function of the the first EventDetector
represents
the "beginning" of the associated phenomenond2
- the second EventDetector
d2IncreasingIsStart
- true if increasing of the g function of the the second EventDetector
represents the "beginning" of the associated phenomenontogetherIn
- true if AND, false if ORpublic CombinedPhenomenaDetector(EventDetector d1, boolean d1IncreasingIsStart, EventDetector d2, boolean d2IncreasingIsStart, boolean togetherIn, EventDetector.Action action)
d1
- the first EventDetector
d1IncreasingIsStart
- true if increasing of the g function of the the first EventDetector
represents
the "beginning" of the associated phenomenond2
- the second EventDetector
d2IncreasingIsStart
- true if increasing of the g function of the the second EventDetector
represents the "beginning" of the associated phenomenontogetherIn
- true if AND, false if ORaction
- action performed at combined Phenomena detectionpublic final double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the SpacecraftState
that contains the current state informationPatriusException
- if some specific error occurspublic EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the SpacecraftState
that contains the current state informationincreasing
- 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 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 void init(SpacecraftState s0, AbsoluteDate t) throws PatriusException
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
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationPatriusException
- thrown if initialization failedpublic EventDetector getDetector1()
public EventDetector getDetector2()
public EventDetector copy()
Copyright © 2023 CNES. All rights reserved.