fr.cnes.sirius.patrius.events.sensor
Class StationToSatMutualVisibilityDetector

java.lang.Object
  extended by org.orekit.propagation.events.AbstractDetector
      extended by fr.cnes.sirius.patrius.events.sensor.AbstractDetectorWithTropoCorrection
          extended by fr.cnes.sirius.patrius.events.sensor.StationToSatMutualVisibilityDetector
All Implemented Interfaces:
Serializable, EventDetector

public class StationToSatMutualVisibilityDetector
extends AbstractDetectorWithTropoCorrection

Mutual station to spacecraft visibility detector : the g function is positive only if the station's sensor sees the spacecraft's sensor AND the spacecraft's sensor sees the station's sensor.

The default implementation behavior is to continue propagation when entering the eclipse and to stop propagation when exiting the eclipse. This can be changed by using one of the provided contructors.

Since:
1.2
Version:
$Id: StationToSatMutualVisibilityDetector.java 14857 2015-12-03 14:17:42Z bignon $
Author:
Thomas Trapier
See Also:
Assembly, GeometricStationAntenna, Serialized Form
Concurrency :
not thread-safe
Concurrency comment :
the direct use of a not thread-safe Assembly makes this class not thread-safe itself

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
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, GeometricStationAntenna station, AngularCorrection correctionModel, boolean withMasking, double maxCheck, double threshold)
          Constructor for the mutual station to spacecraft visibility detector
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, GeometricStationAntenna station, AngularCorrection correctionModel, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
          Constructor for the mutual station to spacecraft visibility detector
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, GeometricStationAntenna station, AngularCorrection correctionModel, boolean withMasking, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
          Constructor for the mutual station to spacecraft visibility detector
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, TopocentricFrame topoFrame, double[][] azimElevMask, AngularCorrection correctionModel, double maxCheck, double threshold)
          Constructor for the mutual station to spacecraft visibility detector
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, TopocentricFrame topoFrame, double[][] azimElevMask, AngularCorrection correctionModel, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
          Constructor for the mutual station to spacecraft visibility detector
StationToSatMutualVisibilityDetector(SensorModel sensorModel1, TopocentricFrame topoFrame, double[][] azimElevMask, AngularCorrection correctionModel, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
          Constructor for the mutual station to spacecraft visibility detector
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle an event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 Assembly getAssembly()
          Get the assembly.
 SensorModel getSensor()
          Get the sensor.
 void init(SpacecraftState s0, AbsoluteDate t)
          Initialize event handler at the start of a propagation.
 boolean shouldBeRemoved()
          This method is called after EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean, boolean) has been triggered.
 
Methods inherited from class fr.cnes.sirius.patrius.events.sensor.AbstractDetectorWithTropoCorrection
getCorrectedVector, getCorrection, getStation
 
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, resetState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            GeometricStationAntenna station,
                                            AngularCorrection correctionModel,
                                            boolean withMasking,
                                            double maxCheck,
                                            double threshold)
Constructor for the mutual station to spacecraft visibility detector

The default implementation behavior is to continue propagation when entering the eclipse and to stop propagation when exiting the eclipse.

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
station - the ground station sensor geometric model.
correctionModel - the elevation correction model for the station
withMasking - set true to compute maskings of each spacecrafts' sensors : in this case, there is no visibility if one of the masking bodies of both sensors is between the spacecraft and the station.
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            GeometricStationAntenna station,
                                            AngularCorrection correctionModel,
                                            boolean withMasking,
                                            double maxCheck,
                                            double threshold,
                                            EventDetector.Action entry,
                                            EventDetector.Action exit)
Constructor for the mutual station to spacecraft visibility detector

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
station - the ground station sensor geometric model.
correctionModel - the elevation correction model for the station
withMasking - set true to compute maskings of each spacecrafts' sensors : in this case, there is no visibility if one of the masking bodies of both sensors is between the spacecraft and the station.
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
entry - action performed when entering the visibility zone
exit - action performed when exiting the visibility zone

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            GeometricStationAntenna station,
                                            AngularCorrection correctionModel,
                                            boolean withMasking,
                                            double maxCheck,
                                            double threshold,
                                            EventDetector.Action entry,
                                            EventDetector.Action exit,
                                            boolean removeEntry,
                                            boolean removeExit)
Constructor for the mutual station to spacecraft visibility detector

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
station - the ground station sensor geometric model.
correctionModel - the elevation correction model for the station
withMasking - set true to compute maskings of each spacecrafts' sensors : in this case, there is no visibility if one of the masking bodies of both sensors is between the spacecraft and the station.
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
entry - action performed when entering the visibility zone
exit - action performed when exiting the visibility zone
removeEntry - true if detector should be removed when entering the visibility zone
removeExit - true if detector should be removed when exiting the visibility zone
Since:
3.1

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            TopocentricFrame topoFrame,
                                            double[][] azimElevMask,
                                            AngularCorrection correctionModel,
                                            double maxCheck,
                                            double threshold)
Constructor for the mutual station to spacecraft visibility detector

The default implementation behavior is to continue propagation when entering the eclipse and to stop propagation when exiting the eclipse.

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
topoFrame - the station's topocentric frame
azimElevMask - azimElevMask the azimuth - elevation mask (rad)
correctionModel - the elevation correction model for the station
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            TopocentricFrame topoFrame,
                                            double[][] azimElevMask,
                                            AngularCorrection correctionModel,
                                            double maxCheck,
                                            double threshold,
                                            EventDetector.Action entry,
                                            EventDetector.Action exit)
Constructor for the mutual station to spacecraft visibility detector

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
topoFrame - the station's topocentric frame
azimElevMask - azimElevMask the azimuth - elevation mask (rad)
correctionModel - the elevation correction model for the station
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
entry - action performed when entering the visibility zone
exit - action performed when exiting the visibility zone

StationToSatMutualVisibilityDetector

public StationToSatMutualVisibilityDetector(SensorModel sensorModel1,
                                            TopocentricFrame topoFrame,
                                            double[][] azimElevMask,
                                            AngularCorrection correctionModel,
                                            double maxCheck,
                                            double threshold,
                                            EventDetector.Action entry,
                                            EventDetector.Action exit,
                                            boolean removeEntry,
                                            boolean removeExit)
Constructor for the mutual station to spacecraft visibility detector

Parameters:
sensorModel1 - the sensor model the main part frame of the assembly must have a parent frame ! Make sure that the main target of this sensor model is the following station !
topoFrame - the station's topocentric frame
azimElevMask - azimElevMask the azimuth - elevation mask (rad)
correctionModel - the elevation correction model for the station
maxCheck - maximum checking interval (s)
threshold - convergence threshold (s)
entry - action performed when entering the visibility zone
exit - action performed when exiting the visibility zone
removeEntry - true if detector should be removed when entering the visibility zone
removeExit - true if detector should be removed when exiting the visibility zone
Method Detail

init

public void init(SpacecraftState s0,
                 AbsoluteDate t)
Description copied from class: AbstractDetector
Initialize event handler at the start of a propagation.

This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.

Specified by:
init in interface EventDetector
Overrides:
init in class AbstractDetector
Parameters:
s0 - initial state
t - target time for the integration

eventOccurred

public EventDetector.Action eventOccurred(SpacecraftState s,
                                          boolean increasing,
                                          boolean forward)
                                   throws OrekitException
Description copied from class: AbstractDetector
Handle an event and choose what to do next.

The scheduling between this method and the OrekitStepHandler method handleStep(interpolator, isLast) is to call this method first and handleStep afterwards. This scheduling allows the propagator to pass true as the isLast parameter to the step handler to make it aware the step will be the last one if this method returns EventDetector.Action.STOP. As the interpolator may be used to navigate back throughout the last step (as OrekitStepNormalizer does for example), user code called by this method and user code called by step handlers may experience apparently out of order values of the independent time variable. As an example, if the same user object implements both this EventDetector interface and the OrekitFixedStepHandler interface, a forward integration may call its eventOccurred method with a state at 2000-01-01T00:00:10 first and call its handleStep method with a state at 2000-01-01T00:00:09 afterwards. Such out of order calls are limited to the size of the integration step for variable step handlers and to the size of the fixed step for fixed step handlers.

Specified by:
eventOccurred in interface EventDetector
Specified by:
eventOccurred in class AbstractDetector
Parameters:
s - the current state information: date, kinematics, attitude for forces and events computation, mass provider, and additional states
increasing - if true, the value of the switching function increases when times increases around event (note that increase is measured with respect to physical time, not with respect to propagation which may go backward in time)
forward - if true, the integration variable (time) increases during integration.
Returns:
one of EventDetector.Action.STOP, EventDetector.Action.RESET_STATE, EventDetector.Action.RESET_DERIVATIVES, EventDetector.Action.CONTINUE
Throws:
OrekitException - if some specific error occurs

shouldBeRemoved

public boolean shouldBeRemoved()
Description copied from class: AbstractDetector
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
Description copied from class: AbstractDetector
Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.

Specified by:
g in interface EventDetector
Specified by:
g in class AbstractDetector
Parameters:
s - the current state information: date, kinematics, attitude for forces and events computation, mass provider, and additional states
Returns:
value of the switching function
Throws:
OrekitException - if some specific error occurs

getSensor

public SensorModel getSensor()
Get the sensor.

Returns:
the sensor

getAssembly

public Assembly getAssembly()
Get the assembly.

Returns:
the assembly


Copyright © 2016 CNES. All Rights Reserved.