org.orekit.propagation.events
Class DateDetector

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

public class DateDetector
extends AbstractDetector
implements TimeStamped

Finder for date events.

This class finds date events (i.e. occurrence of a predefined date).

The default implementation behavior is to stop propagation at date occurrence. This can be changed by overriding the eventOccurred method in a derived class.

Version:
$Revision: 3031 $ $Date: 2010-01-20 13:20:33 +0100 (mer. 20 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
DateDetector(AbsoluteDate target)
          Build a new instance.
 
Method Summary
 int eventOccurred(SpacecraftState s, boolean increasing)
          Handle a date event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 AbsoluteDate getDate()
          Get the target date.
 
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

DateDetector

public DateDetector(AbsoluteDate target)
Build a new instance.

Parameters:
target - target date
Method Detail

eventOccurred

public int eventOccurred(SpacecraftState s,
                         boolean increasing)
                  throws OrekitException
Handle a date event and choose what to do next.

The default implementation behavior is to stop propagation at date occurrence.

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
Throws:
OrekitException - if some specific error occurs

g

public double g(SpacecraftState s)
         throws OrekitException
Compute the value of the switching function. This function measures the difference between the current and the target date.

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

getDate

public AbsoluteDate getDate()
Get the target date.

Specified by:
getDate in interface TimeStamped
Returns:
target date


Copyright © 2002-2010 CS Communication & Systèmes. All Rights Reserved.