fr.cnes.sirius.patrius.events
Class EarthZoneDetector

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

public class EarthZoneDetector
extends AbstractDetector

Detects when the satellite enters a ground zone (several zones can be defined at the same time).

The default implementation behaviour is to stop propagation when the spacecraft enters the zone and to continue when it leaves it. This can be changed by using one of the provided constructors.

Beware of the MaxCheck and Threshold parameters : if the zone is complex and the MaxCheck too large, the event detection could fail, because it would not manage to converge. To compute an approximative event even if the zone is precise and complex, set a large enough Threshold.

Since:
1.1
Version:
$Id: EarthZoneDetector.java 17586 2017-05-10 13:29:16Z bignon $
Author:
Thomas Trapier
See Also:
EventDetector, PyramidalField, Serialized Form
Concurrency :
not thread-safe
Concurrency comment :
attributes are mutable and related to propagation.

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
EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints)
          Constructor for the earth zones entering detector with default maxCheck and convergence threshold.
EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double threshold)
          Constructor for the earth zones entering detector.
EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
          Constructor for the earth zones entering detector.
EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
          Constructor for the earth zones entering detector.
EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame)
          Constructor for the earth zones entering detector with default maxCheck and convergence threshold.
EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double threshold)
          Constructor for the earth zones entering detector.
EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
          Constructor for the earth zones entering detector.
EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
          Constructor.
 
Method Summary
 EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward)
          Handle the event and choose what to do next.
 double g(SpacecraftState s)
          Compute the value of the switching function.
 BodyShape getCentralBodyShape()
          Get the central body shape.
 List<IFieldOfView> getFOV()
          Get FOV list
 Frame getFrame()
          Get the frame.
 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 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

EarthZoneDetector

public EarthZoneDetector(BodyShape centralBody,
                         List<double[][]> zonesPoints)
Constructor for the earth zones entering detector with default maxCheck and convergence threshold.

The zones are defined by an array of geodetic points. The points must be given in the right order : from the point i to the point i + 1, if the associated vector from the center of the earth are v(i) and v(i + 1), the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1).

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft's nadir point to get the angular distance to the

border of the zones.

Parameters:
centralBody - the central body
zonesPoints - The zones : for each of the list, the points that define the zone is given as an array of {latitude, longitude}

EarthZoneDetector

public EarthZoneDetector(BodyShape centralBody,
                         List<double[][]> zonesPoints,
                         double maxCheck,
                         double threshold)
Constructor for the earth zones entering detector.

The zones are defined by an array of geodetic points. The points must be given in the right order : from the point i to the point i + 1, if the associated vector from the center of the earth are v(i) and v(i + 1), the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1).

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft's nadir point to get the angular distance to the border of the zones.

The default implementation behaviour is to stop propagation when the spacecraft point enters the zone and to continue when it leaves it.

Parameters:
centralBody - the central body
zonesPoints - The zones : for each of the list, the points that define the zone is given as an array of {latitude, longitude}
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)

EarthZoneDetector

public EarthZoneDetector(BodyShape centralBody,
                         List<double[][]> zonesPoints,
                         double maxCheck,
                         double threshold,
                         EventDetector.Action entry,
                         EventDetector.Action exit)
Constructor for the earth zones entering detector.

The zones are defined by an array of geodetic points. The points must be given in the right order : from the point i to the point i + 1, if the associated vector from the center of the earth are v(i) and v(i + 1), the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1).

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft's nadir point to get the angular distance to the border of the zones.

Parameters:
centralBody - the central body
zonesPoints - The zones : for each of the list, the points that define the zone is given as an array of {latitude, longitude}
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)
entry - when the spacecraft point enters the zone.
exit - when the spacecraft point leave the zone.

EarthZoneDetector

public EarthZoneDetector(BodyShape centralBody,
                         List<double[][]> zonesPoints,
                         double maxCheck,
                         double threshold,
                         EventDetector.Action entry,
                         EventDetector.Action exit,
                         boolean removeEntry,
                         boolean removeExit)
Constructor for the earth zones entering detector.

The zones are defined by an array of geodetic points. The points must be given in the right order : from the point i to the point i + 1, if the associated vector from the center of the earth are v(i) and v(i + 1), the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1).

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft's nadir point to get the angular distance to the border of the zones.

Parameters:
centralBody - the central body
zonesPoints - The zones : for each of the list, the points that define the zone is given as an array of {latitude, longitude}
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)
entry - when the spacecraft point enters the zone.
exit - when the spacecraft point leave the zone.
removeEntry - when the spacecraft point enters the zone.
removeExit - when the spacecraft point leaves the zone.
Since:
3.1

EarthZoneDetector

public EarthZoneDetector(List<Vector3D[]> directionsList,
                         Frame bodyFrame)
Constructor for the earth zones entering detector with default maxCheck and convergence threshold.

The zones are defined by an array of points of space expressed in the earth attached frame. The points must be given in the right order : from the vector i to the point i + 1, the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1).

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft position itself to get the angular distance to the border of the zones.

Parameters:
directionsList - The zones : for each of the list, the directions from the earth center define the zone
bodyFrame - the frame attached to the earth

EarthZoneDetector

public EarthZoneDetector(List<Vector3D[]> directionsList,
                         Frame bodyFrame,
                         double maxCheck,
                         double threshold)
Constructor for the earth zones entering detector.

The zones are defined by an array of points of space expressed in the earth attached frame. The points must be given in the right order : from the vector i to the point i + 1, the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1)..

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft position itself to get the angular distance to the border of the zones.

The default implementation behaviour is to stop propagation when the spacecraft point enters the zone and to continue when it leaves it.

Parameters:
directionsList - The zones : for each of the list, the directions from the earth center define the zone
bodyFrame - the frame attached to the earth
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)

EarthZoneDetector

public EarthZoneDetector(List<Vector3D[]> directionsList,
                         Frame bodyFrame,
                         double maxCheck,
                         double threshold,
                         EventDetector.Action entry,
                         EventDetector.Action exit)
Constructor for the earth zones entering detector.

The zones are defined by an array of points of space expressed in the Earth attached frame. The points must be given in the right order : from the vector i to the point i + 1, the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1)..

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft position itself to get the angular distance to the border of the zones.

Parameters:
directionsList - The zones : for each of the list, the directions from the earth center define the zone
bodyFrame - the frame attached to the earth
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)
entry - when the spacecraft point enters the zone.
exit - when the spacecraft point leave the zone.

EarthZoneDetector

public EarthZoneDetector(List<Vector3D[]> directionsList,
                         Frame bodyFrame,
                         double maxCheck,
                         double threshold,
                         EventDetector.Action entry,
                         EventDetector.Action exit,
                         boolean removeEntry,
                         boolean removeExit)
Constructor.

The zones are defined by an array of points of space expressed in the Earth attached frame. The points must be given in the right order : from the vector i to the point i + 1, the inside of the zone is on the side of the positive cross vector from the earth center v(i) * v(i+1)..

The arcs defined by two consecutive points shall not cross each other. Two Consecutive points shall not be too close. A point shall not be exactly on the arc defined by two consecutive others.

Using that constructor, the switching function will test the spacecraft position itself to get the angular distance to the border of the zones.

Parameters:
directionsList - The zones : for each of the list, the directions from the earth center define the zone
bodyFrame - the frame attached to the earth
maxCheck - maximum check (see AbstractDetector)
threshold - convergence threshold (see AbstractDetector)
entry - when the spacecraft point enters the zone.
exit - when the spacecraft point leave the zone.
removeEntry - when the spacecraft point enters the zone.
removeExit - when the spacecraft point leaves the 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
Handle the 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 entering or leaving the zone.
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. For each zone : if the zone has been defined with latitudes ans longitudes, this function measures the angular distance from the spacecraft's nadir point to the border of the conic field of space that defines the inside of the zone. If the zone has been defined with direction vectors, it measures the angular distance from the spacecraft itself to the border of that zone. This value is positive when the spacecraft is in the field, negative otherwise.

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

getCentralBodyShape

public BodyShape getCentralBodyShape()
Get the central body shape.

Returns:
the central Body shape

getFrame

public Frame getFrame()
Get the frame.

Returns:
the frame

getFOV

public List<IFieldOfView> getFOV()
Get FOV list

Returns:
the FOV list.


Copyright © 2017 CNES. All Rights Reserved.