org.orekit.propagation.events
Class ApparentElevationDetector

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

public class ApparentElevationDetector
extends AbstractDetector

Finder for satellite apparent elevation events.

This class finds apparent elevation events (i.e. apparent satellite raising and setting from a terrestrial viewpoint).

Apparent elevation is the sum of geometrical elevation and refraction angle, the latter is 0 at zenith, about 1 arcminute at 45°, and 34 arcminutes at the horizon for optical wavelengths.

This event only makes sense for positive apparent elevation in the Earth environment and it is not suited for near zenithal detection, where the simple ElevationDetector fits better.

Refraction angle is computed according to Saemundssen formula quoted by Meeus. For reference, see Astronomical Algorithms (1998), 2nd ed, (ISBN 0-943396-61-1), chap. 15.

This formula is about 30 arcseconds of accuracy very close to the horizon, as variable atmospheric effects become very important.

Local pressure and temperature can be set to correct refraction at the viewpoint.

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

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
static double DEFAULT_PRESSURE
          Default local pressure at viewpoint (Pa).
static double DEFAULT_TEMPERATURE
          Default local temperature at viewpoint (K).
 
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
ApparentElevationDetector(double elevation, TopocentricFrame topo)
          Build a new apparent elevation detector.
ApparentElevationDetector(double elevation, TopocentricFrame topo, double maxCheck)
          Build a new apparent elevation detector.
ApparentElevationDetector(double elevation, TopocentricFrame topo, double maxCheck, double threshold)
          Build a new apparent elevation detector.
ApparentElevationDetector(double elevation, TopocentricFrame topo, double maxCheck, double threshold, EventDetector.Action raisingAction, EventDetector.Action settingAction)
          Build a new apparent elevation detector with specified actions at raising and setting.
ApparentElevationDetector(double elevation, TopocentricFrame topo, double maxCheck, double threshold, EventDetector.Action raisingAction, EventDetector.Action settingAction, boolean raisingRemove, boolean settingRemove)
          Build a new apparent elevation detector with specified actions at raising and setting.
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle an apparent elevation event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 double getElevation()
          Get the threshold apparent elevation value.
 double getPressure()
          Get the local pressure at topocentric frame origin.
 double getTemperature()
          Get the local temperature at topocentric frame origin.
 TopocentricFrame getTopocentricFrame()
          Get the topocentric frame.
 void setPressure(double pressure)
          Set the local pressure at topocentric frame origin if needed.
 void setTemperature(double temperature)
          Set the local temperature at topocentric frame origin if needed.
 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
 

Field Detail

DEFAULT_PRESSURE

public static final double DEFAULT_PRESSURE
Default local pressure at viewpoint (Pa).

See Also:
Constant Field Values

DEFAULT_TEMPERATURE

public static final double DEFAULT_TEMPERATURE
Default local temperature at viewpoint (K).

See Also:
Constant Field Values
Constructor Detail

ApparentElevationDetector

public ApparentElevationDetector(double elevation,
                                 TopocentricFrame topo)
Build a new apparent elevation 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 at raising and to stop propagation at setting.

Parameters:
elevation - threshold elevation value
topo - topocentric frame in which elevation should be evaluated

ApparentElevationDetector

public ApparentElevationDetector(double elevation,
                                 TopocentricFrame topo,
                                 double maxCheck)
Build a new apparent 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.

The default implementation behavior is to continue propagation at raising and to stop propagation at setting.

Parameters:
elevation - threshold elevation value (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)

ApparentElevationDetector

public ApparentElevationDetector(double elevation,
                                 TopocentricFrame topo,
                                 double maxCheck,
                                 double threshold)
Build a new apparent 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:
elevation - threshold elevation value (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)

ApparentElevationDetector

public ApparentElevationDetector(double elevation,
                                 TopocentricFrame topo,
                                 double maxCheck,
                                 double threshold,
                                 EventDetector.Action raisingAction,
                                 EventDetector.Action settingAction)
Build a new apparent elevation detector with specified actions at raising and setting.

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:
elevation - threshold elevation value (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
raisingAction - action performed at raising
settingAction - action performed at setting

ApparentElevationDetector

public ApparentElevationDetector(double elevation,
                                 TopocentricFrame topo,
                                 double maxCheck,
                                 double threshold,
                                 EventDetector.Action raisingAction,
                                 EventDetector.Action settingAction,
                                 boolean raisingRemove,
                                 boolean settingRemove)
Build a new apparent elevation detector with specified actions at raising and setting.

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:
elevation - threshold elevation value (rad)
topo - topocentric frame in which elevation should be evaluated
maxCheck - maximal checking interval (s)
threshold - convergence threshold (s)
raisingAction - action performed at raising
settingAction - action performed at setting
raisingRemove - true if detector should be removed at raising
settingRemove - true if detector should be removed at setting
Since:
3.1
Method Detail

setPressure

public void setPressure(double pressure)
Set the local pressure at topocentric frame origin if needed.

Otherwise the default value for the local pressure is set to DEFAULT_PRESSURE.

Parameters:
pressure - the pressure to set (Pa)

setTemperature

public void setTemperature(double temperature)
Set the local temperature at topocentric frame origin if needed.

Otherwise the default value for the local temperature is set to DEFAULT_TEMPERATURE.

Parameters:
temperature - the temperature to set (K)

getElevation

public double getElevation()
Get the threshold apparent elevation value.

Returns:
the threshold apparent elevation value (rad)

getTopocentricFrame

public TopocentricFrame getTopocentricFrame()
Get the topocentric frame.

Returns:
the topocentric frame

getPressure

public double getPressure()
Get the local pressure at topocentric frame origin.

Returns:
the pressure

getTemperature

public double getTemperature()
Get the local temperature at topocentric frame origin.

Returns:
the temperature

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 apparent 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 apparent elevation 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 apparent elevation and the threshold apparent elevation.

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