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:
java.io.Serializable, EventDetector

public class NodeDetector
extends AbstractDetector

Finder for node crossing events.

This class finds equator crossing events (i.e. ascending or descending node crossing).

The default implementation behavior is to continue propagation at descending node crossing and to stop propagation at ascending node crossing. This can be changed by overriding the eventOccurred method in a derived class.

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 ...

Version:
$Revision: 3027 $ $Date: 2010-01-19 11:36:25 +0100 (mar. 19 janv. 2010) $
Author:
Luc Maisonobe
See Also:
Propagator.addEventDetector(EventDetector), Serialized Form

Field Summary
 
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
 
Fields inherited from interface org.orekit.propagation.events.EventDetector
CONTINUE, RESET_DERIVATIVES, RESET_STATE, STOP
 
Constructor Summary
NodeDetector(double threshold, Orbit orbit, Frame frame)
          Build a new instance.
NodeDetector(Orbit orbit, Frame frame)
          Build a new instance.
 
Method Summary
 int eventOccurred(SpacecraftState s, boolean increasing)
          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.
 
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getMaxCheckInterval, getMaxIterationCount, getThreshold, resetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeDetector

public NodeDetector(Orbit orbit,
                    Frame frame)
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.

Parameters:
orbit - initial orbit
frame - frame in which the equator is defined (typical values are J2000 or ITRF 2005)

NodeDetector

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

The orbit is used only to set an upper bound for the max check interval to period/3.

Parameters:
threshold - convergence threshold (s)
orbit - initial orbit
frame - frame in which the equator is defined (typical values are J2000 or ITRF 2005)
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 int eventOccurred(SpacecraftState s,
                         boolean increasing)
                  throws OrekitException
Handle a node crossing event and choose what to do next.

The default implementation behavior is to continue propagation at descending node crossing and to stop propagation at ascending 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
Returns:
EventDetector.STOP or EventDetector.CONTINUE
Throws:
OrekitException - if some specific error occurs

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 © 2002-2010 CS Communication & Systèmes. All Rights Reserved.