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 FormEventDetector.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_MAXCHECKDECREASING, 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.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.
|
Frame |
getFrame()
Get the frame in which the equator is defined.
|
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, resetStatepublic 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)
public 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 eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The default implementation behavior is to stop propagation at node crossing.
eventOccurred in interface EventDetectoreventOccurred in class AbstractDetectors - 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()
AbstractDetectorEventDetector.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 EventDetectorshouldBeRemoved in class AbstractDetectorpublic double g(SpacecraftState s) throws PatriusException
g in interface EventDetectorg in class AbstractDetectors - the current state information: date, kinematics, attitudePatriusException - if some specific error occursCopyright © 2017 CNES. All rights reserved.