public class NodeDetector extends AbstractDetector
This class finds equator crossing events (i.e. ascending and/or descending node crossing).
The default implementation behavior is to stop
propagation at node crossing. This
can be changed by overriding one of the following constructors :
NodeDetector
: the defined action is performed at ascending OR/AND descending node depending on slope selection
defined.
NodeDetector
: the defined actions are performed at ascending AND descending node.
Beware that node detection will fail for almost equatorial orbits.
Propagator.addEventDetector(EventDetector)
,
Serialized FormAbstractDetector.PropagationDelayType
EventDetector.Action
Modifier and Type | Field and Description |
---|---|
static int |
ASCENDING
Flag for ascending node detection (slopeSelection = 0).
|
static int |
ASCENDING_DESCENDING
Flag for both ascending and descending node detection (slopeSelection = 2).
|
static int |
DESCENDING
Flag for descending node detection (slopeSelection = 1).
|
DEFAULT_MAXCHECK
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
NodeDetector(Frame frameIn,
double maxCheck,
double threshold,
EventDetector.Action ascendingNode,
EventDetector.Action descendingNode)
Build a new instance for both ascending and descending node detection.
|
NodeDetector(Frame frameIn,
double maxCheckIn,
double threshold,
EventDetector.Action ascendingNode,
EventDetector.Action descendingNode,
boolean removeAscendingNode,
boolean removeDescendingNode)
Build a new instance for both ascending and descending node detection.
|
NodeDetector(Frame frameIn,
int slopeSelection,
double maxCheck,
double threshold)
Build a new instance.
|
NodeDetector(Frame frameIn,
int slopeSelection,
double maxCheck,
double threshold,
EventDetector.Action action)
Build a new instance.
|
NodeDetector(Frame frameIn,
int slopeSelection,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean removeCrossingNode)
Build a new instance.
|
NodeDetector(Orbit orbit,
Frame frameIn,
int slopeSelection)
Build a new instance.
|
NodeDetector(Orbit orbit,
Frame frameIn,
int slopeSelection,
double threshold)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle a node crossing event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
EventDetector.Action |
getActionAtAscending()
Returns action at ascending node detection.
|
EventDetector.Action |
getActionAtDescending()
Returns action at descending node detection.
|
Frame |
getFrame()
Get the frame in which the equator is defined.
|
boolean |
removeAtAscending()
Returns true if detection is remove after ascending node detection.
|
boolean |
removeAtDescending()
Returns true if detection is remove after descending node detection.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getPropagationDelayType, getSignalEmissionDate, getSignalReceptionDate, getSlopeSelection, getThreshold, init, resetState, setPropagationDelayType
public static final int ASCENDING
public static final int DESCENDING
public static final int ASCENDING_DESCENDING
public NodeDetector(Orbit orbit, Frame frameIn, int slopeSelection)
The orbit is used only to set an upper bound for the max check interval to period/3 and to set the convergence threshold according to orbit size.
The default implementation behavior is to stop
propagation at node crossing.
orbit
- initial orbitframeIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)slopeSelection
- ASCENDING
for ascending node detection,DESCENDING
for descending node detection,ASCENDING_DESCENDING
for both ascending and descending node
detection.public NodeDetector(Orbit orbit, Frame frameIn, int slopeSelection, double threshold)
The orbit is used only to set an upper bound for the max check interval to period/3.
The default implementation behavior is to stop
propagation at node crossing.
orbit
- initial orbitframeIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)slopeSelection
- ASCENDING
for ascending node detection,DESCENDING
for descending node detection,ASCENDING_DESCENDING
for both ascending and descending node
detection.threshold
- convergence threshold (s)public NodeDetector(Frame frameIn, int slopeSelection, double maxCheck, double threshold)
The default implementation behavior is to stop
propagation at node crossing.
frameIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)slopeSelection
- ASCENDING
for ascending node detection,DESCENDING
for descending node detection,ASCENDING_DESCENDING
for both ascending and descending node
detection.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public NodeDetector(Frame frameIn, double maxCheck, double threshold, EventDetector.Action ascendingNode, EventDetector.Action descendingNode)
frameIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)ascendingNode
- action performed at ascending node crossingdescendingNode
- action performed at descending node crossingpublic NodeDetector(Frame frameIn, double maxCheckIn, double threshold, EventDetector.Action ascendingNode, EventDetector.Action descendingNode, boolean removeAscendingNode, boolean removeDescendingNode)
frameIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)maxCheckIn
- maximal checking interval (s)threshold
- convergence threshold (s)ascendingNode
- action performed at ascending node crossingdescendingNode
- action performed at descending node crossingremoveAscendingNode
- true if detector should be removed at ascending node crossingremoveDescendingNode
- true if detector should be removed at descending node crossingpublic NodeDetector(Frame frameIn, int slopeSelection, double maxCheck, double threshold, EventDetector.Action action)
frameIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)slopeSelection
- ASCENDING
for ascending node detection,DESCENDING
for descending node detection,ASCENDING_DESCENDING
for both ascending and descending node
detection.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)action
- action to be performed at node crossingpublic NodeDetector(Frame frameIn, int slopeSelection, double maxCheck, double threshold, EventDetector.Action action, boolean removeCrossingNode)
frameIn
- frame in which the equator is defined (typical values are
J2000
or
ITRF 2005
)slopeSelection
- ASCENDING
for ascending node detection,DESCENDING
for descending node detection,ASCENDING_DESCENDING
for both ascending and descending node
detection.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)action
- action to be performed at node crossingremoveCrossingNode
- true if detector should be removed at node crossingpublic Frame getFrame()
public EventDetector.Action getActionAtAscending()
public EventDetector.Action getActionAtDescending()
public boolean removeAtAscending()
public boolean removeAtDescending()
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The default implementation behavior is to stop
propagation at node crossing.
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 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 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 occurspublic EventDetector copy()
The following attributes are not deeply copied:
Frame
Copyright © 2020 CNES. All rights reserved.