public class ApparentElevationDetector extends AbstractDetector
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
.
This detector can takes into account signal propagation duration through
AbstractDetector.setPropagationDelayType(PropagationDelayType, fr.cnes.sirius.patrius.frames.Frame)
(default is signal being instantaneous).
Propagator.addEventDetector(EventDetector)
,
Serialized FormAbstractDetector.PropagationDelayType
EventDetector.Action
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_PRESSURE
Default local pressure at viewpoint (Pa).
|
static double |
DEFAULT_TEMPERATURE
Default local temperature at viewpoint (K).
|
actionAtEntry, actionAtExit, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
ApparentElevationDetector(double elevationIn,
TopocentricFrame topoIn)
Build a new apparent elevation detector.
|
ApparentElevationDetector(double elevationIn,
TopocentricFrame topoIn,
double maxCheck)
Build a new apparent elevation detector.
|
ApparentElevationDetector(double elevationIn,
TopocentricFrame topoIn,
double maxCheck,
double threshold)
Build a new apparent elevation detector.
|
ApparentElevationDetector(double elevationIn,
TopocentricFrame topoIn,
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 elevationIn,
TopocentricFrame topoIn,
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.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an apparent elevation event and choose what to do next.
|
double |
g(SpacecraftState state)
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 pressureIn)
Set the local pressure at topocentric frame origin if needed.
|
void |
setPropagationDelayType(AbstractDetector.PropagationDelayType propagationDelayType,
Frame frame)
Setter for propagation delay computation type.
|
void |
setTemperature(double temperatureIn)
Set the local temperature at topocentric frame origin if needed.
|
getActionAtEntry, getActionAtExit, getInertialFrame, getMaxCheckInterval, getMaxIterationCount, getPropagationDelayType, getSignalEmissionDate, getSignalReceptionDate, getSlopeSelection, getThreshold, init, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setEpsilonSignalPropagation, setMaxCheckInterval, setMaxIterSignalPropagation, shouldBeRemoved
public static final double DEFAULT_PRESSURE
public static final double DEFAULT_TEMPERATURE
public ApparentElevationDetector(double elevationIn, TopocentricFrame topoIn)
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.
elevationIn
- threshold elevation valuetopoIn
- topocentric frame in which elevation should be evaluatedpublic ApparentElevationDetector(double elevationIn, TopocentricFrame topoIn, double maxCheck)
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.
elevationIn
- threshold elevation value (rad)topoIn
- topocentric frame in which elevation should be evaluatedmaxCheck
- maximal checking interval (s)public ApparentElevationDetector(double elevationIn, TopocentricFrame topoIn, double maxCheck, double 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.
elevationIn
- threshold elevation value (rad)topoIn
- topocentric frame in which elevation should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public ApparentElevationDetector(double elevationIn, TopocentricFrame topoIn, double maxCheck, double threshold, EventDetector.Action raisingAction, EventDetector.Action settingAction)
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.
elevationIn
- threshold elevation value (rad)topoIn
- topocentric frame in which elevation should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)raisingAction
- action performed at raisingsettingAction
- action performed at settingpublic ApparentElevationDetector(double elevationIn, TopocentricFrame topoIn, double maxCheck, double threshold, EventDetector.Action raisingAction, EventDetector.Action settingAction, boolean raisingRemove, boolean settingRemove)
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.
elevationIn
- threshold elevation value (rad)topoIn
- topocentric frame in which elevation should be evaluatedmaxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)raisingAction
- action performed at raisingsettingAction
- action performed at settingraisingRemove
- true if detector should be removed at raisingsettingRemove
- true if detector should be removed at settingpublic void setPressure(double pressureIn)
Otherwise the default value for the local pressure is set to DEFAULT_PRESSURE
.
pressureIn
- the pressure to set (Pa)public void setTemperature(double temperatureIn)
Otherwise the default value for the local temperature is set to DEFAULT_TEMPERATURE
.
temperatureIn
- the temperature to set (K)public double getElevation()
public TopocentricFrame getTopocentricFrame()
public double getPressure()
public double getTemperature()
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information : date, kinematics, attitudeincreasing
- if true, the value of the switching function increases when times increases
around eventforward
- if true, the integration variable (time) increases during integration.PatriusException
- if some specific error occurspublic double g(SpacecraftState state) throws PatriusException
This function measures the difference between the current apparent elevation and the threshold apparent elevation.
g
in interface EventDetector
g
in class AbstractDetector
state
- the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesPatriusException
- if some specific error occurspublic void setPropagationDelayType(AbstractDetector.PropagationDelayType propagationDelayType, Frame frame)
AbstractDetector
setPropagationDelayType
in class AbstractDetector
propagationDelayType
- propagation delay type used in events computationframe
- frame to use for signal propagation with delay (may be null if propagation delay type is
considered instantaneous). Warning: the usage of a pseudo inertial frame is tolerated, however it will
lead to some inaccuracies due to the non-invariance of the frame with respect to time. For this reason,
it is suggested to use the ICRF frame or a frame which is frozen with respect to the ICRF.public EventDetector copy()
The following attributes are not deeply copied:
TopocentricFrame
Copyright © 2023 CNES. All rights reserved.