org.orekit.propagation.events
Class GroundMaskElevationDetector

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

public class GroundMaskElevationDetector
extends AbstractDetector

Finder for satellite azimuth-elevation events with respect to a mask.

This class finds elevation events (i.e. satellite raising and setting) with respect to an azimuth-elevation mask.

An azimuth-elevation mask defines the physical horizon for a local point, origin of some topocentric frame.

Azimuth is defined according to getAzimuth. Elevation is defined according to getElevation.

The azimuth elevation mask must be supplied as a twodimensional array with multiples lines of pairs of azimuth-elevation angles. First row will be filled with azimuth values, second row with elevation values, as in the following snippet:

    double [][] mask = {
                        {FastMathFastMath.toRadians(0),   FastMath.toRadians(10)},
                        {FastMathFastMath.toRadians(45),  FastMath.toRadians(8)},
                        {FastMathFastMath.toRadians(90),  FastMath.toRadians(6)},
                        {FastMathFastMath.toRadians(135), FastMath.toRadians(4)},
                        {FastMathFastMath.toRadians(180), FastMath.toRadians(5)},
                        {FastMathFastMath.toRadians(225), FastMath.toRadians(6)},
                        {FastMathFastMath.toRadians(270), FastMath.toRadians(8)},
                        {FastMathFastMath.toRadians(315), FastMath.toRadians(9)}
                       };
  

No assumption is made on azimuth values and ordering. The only restraint is that only one elevation value can be associated to identical azimuths modulo 2PI.

The default implementation behavior is to continue propagation at raising and to stop propagation at setting. This can be changed by using provided constructors.

Author:
Pascal Parraud
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
GroundMaskElevationDetector(double[][] azimelev, TopocentricFrame topo)
          Build a new azimuth-elevation detector.
GroundMaskElevationDetector(double[][] azimelev, TopocentricFrame topo, double maxCheck)
          Build a new azimuth-elevation detector.
GroundMaskElevationDetector(double[][] azimelev, TopocentricFrame topo, double maxCheck, double threshold)
          Build a new azimuth-elevation detector.
GroundMaskElevationDetector(double[][] azimelev, TopocentricFrame topo, double maxCheck, double threshold, EventDetector.Action raising, EventDetector.Action setting)
          Build a new azimuth-elevation detector.
GroundMaskElevationDetector(double[][] azimelev, TopocentricFrame topo, double maxCheck, double threshold, EventDetector.Action raising, EventDetector.Action setting, boolean removeRaising, boolean removeSetting)
          Build a new azimuth-elevation detector.
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle an azimuth-elevation event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 double getElevation(double azimuth)
          Get the interpolated elevation for a given azimuth according to the mask.
 TopocentricFrame getTopocentricFrame()
          Get the topocentric frame.
 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

GroundMaskElevationDetector

public GroundMaskElevationDetector(double[][] azimelev,
                                   TopocentricFrame topo)
Build a new azimuth-elevation detector.

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

Parameters:
azimelev - azimuth-elevation mask (rad)
topo - topocentric frame in which elevation should be evaluated
Throws:
IllegalArgumentException - if azimuth-elevation mask is not supported

GroundMaskElevationDetector

public GroundMaskElevationDetector(double[][] azimelev,
                                   TopocentricFrame topo,
                                   double maxCheck)
Build a new azimuth-elevation detector.

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

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

Parameters:
azimelev - azimuth-elevation mask (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
Throws:
IllegalArgumentException - if azimuth-elevation mask is not supported

GroundMaskElevationDetector

public GroundMaskElevationDetector(double[][] azimelev,
                                   TopocentricFrame topo,
                                   double maxCheck,
                                   double threshold)
Build a new azimuth-elevation detector.

The maximal interval between elevation 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 at raising and to stop propagation at setting.

Parameters:
azimelev - azimuth-elevation mask (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
Throws:
IllegalArgumentException - if azimuth-elevation mask is not supported

GroundMaskElevationDetector

public GroundMaskElevationDetector(double[][] azimelev,
                                   TopocentricFrame topo,
                                   double maxCheck,
                                   double threshold,
                                   EventDetector.Action raising,
                                   EventDetector.Action setting)
Build a new azimuth-elevation detector.

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

Parameters:
azimelev - azimuth-elevation mask (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
raising - action performed when propagation at raising
setting - action performed when propagation at setting
Throws:
IllegalArgumentException - if azimuth-elevation mask is not supported

GroundMaskElevationDetector

public GroundMaskElevationDetector(double[][] azimelev,
                                   TopocentricFrame topo,
                                   double maxCheck,
                                   double threshold,
                                   EventDetector.Action raising,
                                   EventDetector.Action setting,
                                   boolean removeRaising,
                                   boolean removeSetting)
Build a new azimuth-elevation detector.

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

Parameters:
azimelev - azimuth-elevation mask (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
raising - action performed when propagation at raising
setting - action performed when propagation at setting
removeRaising - if detector should be removed at raising
removeSetting - if detector should be removed at setting
Throws:
IllegalArgumentException - if azimuth-elevation mask is not supported
Method Detail

getTopocentricFrame

public TopocentricFrame getTopocentricFrame()
Get the topocentric frame.

Returns:
the topocentric frame

eventOccurred

public EventDetector.Action eventOccurred(SpacecraftState s,
                                          boolean increasing,
                                          boolean forward)
                                   throws OrekitException
Handle an azimuth-elevation 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 propagation raising or setting.
Throws:
OrekitException - if some specific error occurs

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

g

public double g(SpacecraftState s)
         throws OrekitException
Compute the value of the switching function. This function measures the difference between the current elevation and the elevation for current azimuth interpolated from azimuth-elevation mask.

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

getElevation

public double getElevation(double azimuth)
Get the interpolated elevation for a given azimuth according to the mask.

Parameters:
azimuth - azimuth (rad)
Returns:
elevation angle (rad)


Copyright © 2017 CNES. All Rights Reserved.