public class PolygonalFieldOfView extends AbstractFieldOfView
Fields Of View are zones defined on the unit sphere centered on the spacecraft. They can have any shape, they can be split in several non-connected patches and can have holes.
Modifier and Type | Class and Description |
---|---|
static class |
PolygonalFieldOfView.DefiningConeType
Enumerate for cone/polygon relative position.
|
Constructor and Description |
---|
PolygonalFieldOfView(SphericalPolygonsSet zone,
double margin)
Build a new instance.
|
PolygonalFieldOfView(Vector3D center,
PolygonalFieldOfView.DefiningConeType coneType,
Vector3D meridian,
double radius,
int n,
double margin)
Build Field Of View with a regular polygon shape.
|
PolygonalFieldOfView(Vector3D center,
Vector3D meridian,
double insideRadius,
int n,
double margin)
Deprecated.
as of 10.1, replaced by
PolygonalFieldOfView(Vector3D,
DefiningConeType, Vector3D, double, int, double) |
Modifier and Type | Method and Description |
---|---|
List<List<GeodeticPoint>> |
getFootprint(Transform fovToBody,
OneAxisEllipsoid body,
double angularStep)
Get the footprint of the Field Of View on ground.
|
SphericalPolygonsSet |
getZone()
Get the interior zone.
|
double |
offsetFromBoundary(Vector3D lineOfSight,
double angularRadius,
VisibilityTrigger trigger)
Get the offset of target body with respect to the Field Of View Boundary.
|
Vector3D |
projectToBoundary(Vector3D lineOfSight)
Find the direction on Field Of View Boundary closest to a line of sight.
|
getMargin
public PolygonalFieldOfView(SphericalPolygonsSet zone, double margin)
zone
- interior of the Field Of View, in spacecraft framemargin
- angular margin to apply to the zone (if positive,
points outside of the raw FoV but close enough to the boundary are
considered visible; if negative, points inside of the raw FoV
but close enough to the boundary are considered not visible)@Deprecated public PolygonalFieldOfView(Vector3D center, Vector3D meridian, double insideRadius, int n, double margin)
PolygonalFieldOfView(Vector3D,
DefiningConeType, Vector3D, double, int, double)
center
- center of the polygon (the center is in the inside part)meridian
- point defining the reference meridian for middle of first edgeinsideRadius
- distance of the edges middle points to the center
(the polygon vertices will therefore be farther away from the center)n
- number of sides of the polygonmargin
- angular margin to apply to the zone (if positive,
points outside of the raw FoV but close enough to the boundary are
considered visible; if negative, points inside of the raw FoV
but close enough to the boundary are considered not visible)public PolygonalFieldOfView(Vector3D center, PolygonalFieldOfView.DefiningConeType coneType, Vector3D meridian, double radius, int n, double margin)
center
- center of the polygon (the center is in the inside part)coneType
- type of defining conemeridian
- point defining the reference meridian for one contact
point between defining cone and polygon (i.e. either a polygon edge
middle point or a polygon vertex)radius
- defining cone angular radiusn
- number of sides of the polygonmargin
- angular margin to apply to the zone (if positive,
points outside of the raw FoV but close enough to the boundary are
considered visible; if negative, points inside of the raw FoV
but close enough to the boundary are considered not visible)public SphericalPolygonsSet getZone()
public double offsetFromBoundary(Vector3D lineOfSight, double angularRadius, VisibilityTrigger trigger)
The offset is the signed angular distance between target body and closest boundary
point, taking into account VisibilityTrigger
and margin
.
As Field Of View can have complex shapes that may require long computation,
when the target point can be proven to be outside of the Field Of View, a
faster but approximate computation can be used. This approximation is only
performed about 0.01 radians outside of the Field Of View augmented by the
deadband defined by target body radius and Field Of View margin and should be
designed to still return a positive value if the full accurate computation
would return a positive value. When target point is close to the zone (and
furthermore when it is inside the zone), the full accurate computation is
performed. This design allows this offset to be used as a reliable way to
detect Field Of View boundary crossings (taking VisibilityTrigger
and margin
into account), which correspond to sign
changes of the offset.
lineOfSight
- line of sight from the center of the Field Of View support
unit sphere to the target in spacecraft frameangularRadius
- target body angular radiustrigger
- visibility trigger for spherical bodiesFieldOfView.offsetFromBoundary(Vector3D, double, VisibilityTrigger)
public Vector3D projectToBoundary(Vector3D lineOfSight)
lineOfSight
- line of sight from the center of the Field Of View support
unit sphere to the target in spacecraft framepublic List<List<GeodeticPoint>> getFootprint(Transform fovToBody, OneAxisEllipsoid body, double angularStep)
This method assumes the Field Of View is centered on some carrier, which will typically be a spacecraft or a ground station antenna. The points in the footprint boundary loops are all at altitude zero with respect to the ellipsoid, they correspond either to projection on ground of the edges of the Field Of View, or to points on the body limb if the Field Of View goes past horizon. The points on the limb see the carrier origin at zero elevation. If the Field Of View is so large it contains entirely the body, all points will correspond to points at limb. If the Field Of View looks away from body, the boundary loops will be an empty list. The points within footprint loops are sorted in trigonometric order as seen from the carrier. This implies that someone traveling on ground from one point to the next one will have the points visible from the carrier on his left hand side, and the points not visible from the carrier on his right hand side.
The truncation of Field Of View at limb can induce strange results for complex Fields Of View. If for example a Field Of View is a ring with a hole and part of the ring goes past horizon, then instead of having a single loop with a C-shaped boundary, the method will still return two loops truncated at the limb, one clockwise and one counterclockwise, hence "closing" the C-shape twice. This behavior is considered acceptable.
If the carrier is a spacecraft, then the fovToBody
transform
can be computed from a SpacecraftState
as follows:
Transform inertToBody = state.getFrame().getTransformTo(body.getBodyFrame(), state.getDate()); Transform fovToBody = new Transform(state.getDate(), state.toTransform().getInverse(), inertToBody);
If the carrier is a ground station, located using a topocentric frame
and managing its pointing direction using a transform between the
dish frame and the topocentric frame, then the fovToBody
transform
can be computed as follows:
Transform topoToBody = topocentricFrame.getTransformTo(body.getBodyFrame(), date); Transform topoToDish = ... Transform fovToBody = new Transform(date, topoToDish.getInverse(), topoToBody);
Only the raw zone is used, the angular margin is ignored here.
fovToBody
- transform between the frame in which the Field Of View
is defined and body frame.body
- body surface the Field Of View will be projected onangularStep
- step used for boundary loops sampling (radians),
beware this is generally not an angle on the unit sphere, but rather a
phase angle used by the underlying Field Of View boundary modelCopyright © 2002-2020 CS Group. All rights reserved.