org.orekit.propagation.events
Class CombinedEventsDetectorsManager

java.lang.Object
  extended by org.orekit.propagation.events.CombinedEventsDetectorsManager
All Implemented Interfaces:
java.io.Serializable

public class CombinedEventsDetectorsManager
extends java.lang.Object
implements java.io.Serializable

This class manages several event detectors during propagation.

This class is heavily based on the CombinedEventsManager class from the Apache commons-math library. The changes performed consist in replacing raw types (double and double arrays) with space dynamics types (AbsoluteDate, SpacecraftState).

Version:
$Revision: 2773 $ $Date: 2009-05-26 18:36:27 +0200 (mar. 26 mai 2009) $
See Also:
EventDetector, Serialized Form

Constructor Summary
CombinedEventsDetectorsManager()
          Simple constructor.
 
Method Summary
 void addEventDetector(EventDetector detector)
          Add an event detector.
 void clearEventsDetectors()
          Remove all the events detectors that have been added to the handler.
 boolean evaluateStep(OrekitStepInterpolator interpolator)
          Evaluate the impact of the proposed step on all handled events detectors.
 java.util.Collection<EventDetector> getEventsDetectors()
          Get all the events detectors that have been added to the manager.
 AbsoluteDate getEventTime()
          Get the occurrence time of the first event triggered in the last evaluated step.
 SpacecraftState reset(SpacecraftState oldSpacecraftState)
          Let the events detectors reset the state if they want.
 void stepAccepted(SpacecraftState spacecraftState)
          Inform the events detectors that the step has been accepted by the propagator.
 boolean stop()
          Check if the propagation should be stopped at the end of the current step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedEventsDetectorsManager

public CombinedEventsDetectorsManager()
Simple constructor. Create an empty manager

Method Detail

addEventDetector

public void addEventDetector(EventDetector detector)
Add an event detector.

Parameters:
detector - event detector to add
See Also:
getEventsDetectors(), clearEventsDetectors()

getEventsDetectors

public java.util.Collection<EventDetector> getEventsDetectors()
Get all the events detectors that have been added to the manager.

Returns:
an unmodifiable collection of the added events detectors
See Also:
addEventDetector(EventDetector), clearEventsDetectors()

clearEventsDetectors

public void clearEventsDetectors()
Remove all the events detectors that have been added to the handler.

See Also:
addEventDetector(EventDetector), getEventsDetectors()

evaluateStep

public boolean evaluateStep(OrekitStepInterpolator interpolator)
                     throws OrekitException,
                            org.apache.commons.math.ConvergenceException
Evaluate the impact of the proposed step on all handled events detectors.

Parameters:
interpolator - step interpolator for the proposed step
Returns:
true if at least one event detector triggers an event before the end of the proposed step (this implies the step should be rejected)
Throws:
OrekitException - if the interpolator fails to compute the function somewhere within the step
org.apache.commons.math.ConvergenceException - if an event cannot be located

getEventTime

public AbsoluteDate getEventTime()
Get the occurrence time of the first event triggered in the last evaluated step.

Returns:
occurrence time of the first event triggered in the last evaluated step, or null if no event is triggered

stepAccepted

public void stepAccepted(SpacecraftState spacecraftState)
                  throws OrekitException
Inform the events detectors that the step has been accepted by the propagator.

Parameters:
spacecraftState - state value at the end of the step
Throws:
OrekitException - if the value of one of the events detectors cannot be evaluated

stop

public boolean stop()
Check if the propagation should be stopped at the end of the current step.

Returns:
true if the propagation should be stopped

reset

public SpacecraftState reset(SpacecraftState oldSpacecraftState)
                      throws OrekitException
Let the events detectors reset the state if they want.

If several detectors reset the state at the same time, the former changes will be overriden by later changes, and only the last change will be returned. A better way to handle this is to use only one event detector for simultaneous changes.

Parameters:
oldSpacecraftState - value of the state vector at the beginning of the next step
Returns:
new state (oldState if no reset is needed)
Throws:
OrekitException - if one of the events detectors that should reset the state fails to do it


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