public class EarthZoneDetector extends AbstractDetector
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.
EventDetector
,
PyramidalField
,
Serialized FormEventDetector.Action
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
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<IFieldOfView> fieldsIn,
BodyShape centralBody,
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.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
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(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, resetState
public EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints)
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.centralBody
- the central bodyzonesPoints
- The zones : for each of the list, the points that define the zone is given
as an array of {latitude, longitude}public EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double 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.
The default implementation behaviour is to
stop
propagation
when the spacecraft point enters the zone and to
continue
when
it leaves it.
centralBody
- the central bodyzonesPoints
- 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
)public EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
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.
centralBody
- the central bodyzonesPoints
- 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.public EarthZoneDetector(BodyShape centralBody, List<double[][]> zonesPoints, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
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.
centralBody
- the central bodyzonesPoints
- 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.public EarthZoneDetector(List<IFieldOfView> fieldsIn, BodyShape centralBody, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
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.
centralBody
- the central bodyfieldsIn
- list of fields of viewmaxCheck
- 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.public EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame)
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.
directionsList
- The zones : for each of the list, the directions from the earth center
define the zonebodyFrame
- the frame attached to the earthpublic EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double 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.
The default implementation behaviour is to
stop
propagation
when the spacecraft point enters the zone and to continue when it leaves it.
directionsList
- The zones : for each of the list, the directions from the earth center
define the zonebodyFrame
- the frame attached to the earthmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)public EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
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.
directionsList
- The zones : for each of the list, the directions from the earth center
define the zonebodyFrame
- the frame attached to the earthmaxCheck
- 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.public EarthZoneDetector(List<Vector3D[]> directionsList, Frame bodyFrame, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
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.
directionsList
- The zones : for each of the list, the directions from the earth center
define the zonebodyFrame
- the frame attached to the earthmaxCheck
- 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.public void init(SpacecraftState s0, AbsoluteDate t)
AbstractDetector
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.
init
in interface EventDetector
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationpublic 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 boolean shouldBeRemoved()
EventDetector.eventOccurred(fr.cnes.sirius.patrius.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.shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in class AbstractDetector
public double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitudePatriusException
- if some specific error occurspublic BodyShape getCentralBodyShape()
public Frame getFrame()
public List<IFieldOfView> getFOV()
public EventDetector copy()
The following attributes are not deeply copied:
BodyShape
IFieldOfView
Copyright © 2018 CNES. All Rights Reserved.