org.orekit.propagation.events
Class NodeDetector

java.lang.Object
  extended by org.orekit.propagation.events.AbstractDetector
      extended by org.orekit.propagation.events.NodeDetector
All Implemented Interfaces:
Serializable, EventDetector

public class NodeDetector
extends AbstractDetector

Finder for node crossing events.

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 :

Beware that node detection will fail for almost equatorial orbits. If for example a node detector is used to trigger an ImpulseManeuver and the maneuver turn the orbit plane to equator, then the detector may completely fail just after the maneuver has been performed! This is a real case that has been encountered during validation ...

Author:
Luc Maisonobe
See Also:
Propagator.addEventDetector(EventDetector), Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.orekit.propagation.events.EventDetector
EventDetector.Action
 
Field Summary
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).
 
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
 
Fields inherited from interface org.orekit.propagation.events.EventDetector
DECREASING, INCREASING, INCREASING_DECREASING
 
Constructor Summary
NodeDetector(Frame frame, double maxCheck, double threshold, EventDetector.Action ascendingNode, EventDetector.Action descendingNode)
          Build a new instance for both ascending and descending node detection.
NodeDetector(Frame frame, double maxCheck, 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 frame, int slopeSelection, double maxCheck, double threshold)
          Build a new instance.
NodeDetector(Frame frame, int slopeSelection, double maxCheck, double threshold, EventDetector.Action action)
          Build a new instance.
NodeDetector(Frame frame, int slopeSelection, double maxCheck, double threshold, EventDetector.Action action, boolean removeCrossingNode)
          Build a new instance.
NodeDetector(Orbit orbit, Frame frame, int slopeSelection)
          Build a new instance.
NodeDetector(Orbit orbit, Frame frame, int slopeSelection, double threshold)
          Build a new instance.
 
Method Summary
 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(org.orekit.propagation.SpacecraftState, boolean, boolean) has been triggered.
 
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, resetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final int ASCENDING
Flag for ascending node detection (slopeSelection = 0).

See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
Flag for descending node detection (slopeSelection = 1).

See Also:
Constant Field Values

ASCENDING_DESCENDING

public static final int ASCENDING_DESCENDING
Flag for both ascending and descending node detection (slopeSelection = 2).

See Also:
Constant Field Values
Constructor Detail

NodeDetector

public NodeDetector(Orbit orbit,
                    Frame frame,
                    int slopeSelection)
Build a new instance.

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.

Parameters:
orbit - initial orbit
frame - 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.

NodeDetector

public NodeDetector(Orbit orbit,
                    Frame frame,
                    int slopeSelection,
                    double threshold)
Build a new instance.

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.

Parameters:
orbit - initial orbit
frame - 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)

NodeDetector

public NodeDetector(Frame frame,
                    int slopeSelection,
                    double maxCheck,
                    double threshold)
Build a new instance.

The default implementation behavior is to stop propagation at node crossing.

Parameters:
frame - 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)

NodeDetector

public NodeDetector(Frame frame,
                    double maxCheck,
                    double threshold,
                    EventDetector.Action ascendingNode,
                    EventDetector.Action descendingNode)
Build a new instance for both ascending and descending node detection.

Parameters:
frame - 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 crossing
descendingNode - action performed at descending node crossing

NodeDetector

public NodeDetector(Frame frame,
                    double maxCheck,
                    double threshold,
                    EventDetector.Action ascendingNode,
                    EventDetector.Action descendingNode,
                    boolean removeAscendingNode,
                    boolean removeDescendingNode)
Build a new instance for both ascending and descending node detection.

Parameters:
frame - 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 crossing
descendingNode - action performed at descending node crossing
removeAscendingNode - true if detector should be removed at ascending node crossing
removeDescendingNode - true if detector should be removed at descending node crossing
Since:
3.1

NodeDetector

public NodeDetector(Frame frame,
                    int slopeSelection,
                    double maxCheck,
                    double threshold,
                    EventDetector.Action action)
Build a new instance.

Parameters:
frame - 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 crossing

NodeDetector

public NodeDetector(Frame frame,
                    int slopeSelection,
                    double maxCheck,
                    double threshold,
                    EventDetector.Action action,
                    boolean removeCrossingNode)
Build a new instance.

Parameters:
frame - 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 crossing
removeCrossingNode - true if detector should be removed at node crossing
Since:
3.1
Method Detail

getFrame

public Frame getFrame()
Get the frame in which the equator is defined.

Returns:
the frame in which the equator is defined

eventOccurred

public EventDetector.Action eventOccurred(SpacecraftState s,
                                          boolean increasing,
                                          boolean forward)
                                   throws OrekitException
Handle a node crossing event and choose what to do next.

The default implementation behavior is to stop propagation at node crossing.

Specified by:
eventOccurred in interface EventDetector
Specified by:
eventOccurred in class AbstractDetector
Parameters:
s - the current state information : date, kinematics, attitude
increasing - if true, the value of the switching function increases when times increases around event
forward - if true, the integration variable (time) increases during integration.
Returns:
the action performed when ascending or/and descending node is reached.
Throws:
OrekitException - if some specific error occurs

shouldBeRemoved

public boolean shouldBeRemoved()
Description copied from class: AbstractDetector
This method is called after EventDetector.eventOccurred(org.orekit.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.

Specified by:
shouldBeRemoved in interface EventDetector
Specified by:
shouldBeRemoved in class AbstractDetector
Returns:
true if the current detector should be removed after first event detection

g

public double g(SpacecraftState s)
         throws OrekitException
Compute the value of the switching function. This function computes the Z position in the defined frame.

Specified by:
g in interface EventDetector
Specified by:
g in class AbstractDetector
Parameters:
s - the current state information: date, kinematics, attitude
Returns:
value of the switching function
Throws:
OrekitException - if some specific error occurs


Copyright © 2016 CNES. All Rights Reserved.