Class GeographicZoneDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<GeographicZoneDetector>
-
- org.orekit.propagation.events.GeographicZoneDetector
-
- All Implemented Interfaces:
Serializable
,EventDetector
public class GeographicZoneDetector extends AbstractDetector<GeographicZoneDetector>
Detector for entry/exit of a zone defined by geographic boundaries.This detector identifies when a spacecraft crosses boundaries of general shapes defined on the surface of the globe. Typical shapes of interest can be countries, land masses or physical areas like the south atlantic anomaly. Shapes can be arbitrarily complicated: convex or non-convex, in one piece or several non-connected islands, they can include poles, they can have holes like the Caspian Sea (this would be a hole only if one is interested in land masses, of course). Complex shapes involve of course more computing time than simple shapes.
- Since:
- 6.2
- Author:
- Luc Maisonobe
- See Also:
FootprintOverlapDetector
, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description GeographicZoneDetector(double maxCheck, double threshold, BodyShape body, org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone, double margin)
Build a detector.GeographicZoneDetector(BodyShape body, org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone, double margin)
Build a new detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GeographicZoneDetector
create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super GeographicZoneDetector> newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the detection function.BodyShape
getBody()
Get the body on which the geographic zone is defined.double
getMargin()
Get the angular margin to apply (radians).org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet
getZone()
Get the geographic zone.GeographicZoneDetector
withMargin(double newMargin)
Setup the detector margin.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
GeographicZoneDetector
public GeographicZoneDetector(BodyShape body, org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone, double margin)
Build a new detector.The new instance uses default values for maximal checking interval (
AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).- Parameters:
body
- body on which the geographic zone is definedzone
- geographic zone to considermargin
- angular margin to apply to the zone
-
GeographicZoneDetector
public GeographicZoneDetector(double maxCheck, double threshold, BodyShape body, org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone, double margin)
Build a detector.- Parameters:
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)body
- body on which the geographic zone is definedzone
- geographic zone to considermargin
- angular margin to apply to the zone
-
-
Method Detail
-
create
protected GeographicZoneDetector create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super GeographicZoneDetector> newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<GeographicZoneDetector>
- Parameters:
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
withMargin
public GeographicZoneDetector withMargin(double newMargin)
Setup the detector margin.- Parameters:
newMargin
- angular margin to apply to the zone- Returns:
- a new detector with updated configuration (the instance is not changed)
-
getBody
public BodyShape getBody()
Get the body on which the geographic zone is defined.- Returns:
- body on which the geographic zone is defined
-
getZone
public org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet getZone()
Get the geographic zone.- Returns:
- the geographic zone
-
getMargin
public double getMargin()
Get the angular margin to apply (radians).- Returns:
- the angular margin to apply (radians)
-
g
public double g(SpacecraftState s)
Compute the value of the detection function.The value is the signed distance to boundary, minus the margin. It is positive if the spacecraft is outside of the zone and negative if it is inside.
- Specified by:
g
in interfaceEventDetector
- Specified by:
g
in classAbstractDetector<GeographicZoneDetector>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- signed distance to boundary minus the margin
-
-