org.orekit.propagation.events
Class AltitudeDetector

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

public class AltitudeDetector
extends AbstractDetector

Finder for satellite altitude crossing events.

This class finds altitude events (i.e. satellite crossing a predefined altitude level above ground).

The default implementation behavior is to continue propagation when ascending and to stop propagation when descending. This can be changed by using provided constructors.

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
 
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
AltitudeDetector(double altitude, BodyShape bodyShape)
          Build a new altitude detector.
AltitudeDetector(double altitude, BodyShape bodyShape, double maxCheck)
          Build a new altitude detector.
AltitudeDetector(double altitude, BodyShape bodyShape, double maxCheck, double threshold)
          Build a new altitude detector.
AltitudeDetector(double altitude, BodyShape bodyShape, double maxCheck, double threshold, EventDetector.Action ascending, EventDetector.Action descending)
          Build a new altitude detector.
AltitudeDetector(double altitude, BodyShape bodyShape, double maxCheck, double threshold, EventDetector.Action ascending, EventDetector.Action descending, boolean removeAscending, boolean removeDescending)
          Build a new altitude detector.
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle an altitude event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 double getAltitude()
          Get the threshold altitude value.
 BodyShape getBodyShape()
          Get the body shape.
 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
 

Constructor Detail

AltitudeDetector

public AltitudeDetector(double altitude,
                        BodyShape bodyShape)
Build a new altitude detector.

This simple constructor takes default values for maximal checking interval (AbstractDetector.DEFAULT_MAXCHECK) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).

The default implementation behavior is to continue propagation when ascending and to stop propagation when descending.

Parameters:
altitude - threshold altitude value
bodyShape - body shape with respect to which altitude should be evaluated

AltitudeDetector

public AltitudeDetector(double altitude,
                        BodyShape bodyShape,
                        double maxCheck)
Build a new altitude detector.

This simple constructor takes default value for convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).

The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

The default implementation behavior is to continue propagation when ascending and to stop propagation when descending.

Parameters:
altitude - threshold altitude value (m)
bodyShape - body shape with respect to which altitude should be evaluated
maxCheck - maximal checking interval (s)

AltitudeDetector

public AltitudeDetector(double altitude,
                        BodyShape bodyShape,
                        double maxCheck,
                        double threshold)
Build a new altitude detector.

The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

The default implementation behavior is to continue propagation when ascending and to stop propagation when descending.

Parameters:
altitude - threshold altitude value (m)
bodyShape - body shape with respect to which altitude should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)

AltitudeDetector

public AltitudeDetector(double altitude,
                        BodyShape bodyShape,
                        double maxCheck,
                        double threshold,
                        EventDetector.Action ascending,
                        EventDetector.Action descending)
Build a new altitude detector.

The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

Parameters:
altitude - threshold altitude value (m)
bodyShape - body shape with respect to which altitude should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
ascending - action performed when ascending
descending - action performed when descending

AltitudeDetector

public AltitudeDetector(double altitude,
                        BodyShape bodyShape,
                        double maxCheck,
                        double threshold,
                        EventDetector.Action ascending,
                        EventDetector.Action descending,
                        boolean removeAscending,
                        boolean removeDescending)
Build a new altitude detector.

The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

Parameters:
altitude - threshold altitude value (m)
bodyShape - body shape with respect to which altitude should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
ascending - action performed when ascending
descending - action performed when descending
removeAscending - true if detector should be removed at ascending altitude detection
removeDescending - true if detector should be removed at descending altitude detection
Since:
3.1
Method Detail

getAltitude

public double getAltitude()
Get the threshold altitude value.

Returns:
the threshold altitude value (m)

getBodyShape

public BodyShape getBodyShape()
Get the body shape.

Returns:
the body shape

shouldBeRemoved

public boolean shouldBeRemoved()
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

eventOccurred

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

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 altitude is reached.
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 altitude and the threshold altitude.

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 © 2017 CNES. All Rights Reserved.