public class CircularFieldOfView extends SmoothFieldOfView
The field of view is defined by an axis and an half-aperture angle.
Constructor and Description |
---|
CircularFieldOfView(Vector3D center,
double halfAperture,
double margin)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected Vector3D |
directionAt(double angle)
Get boundary direction at angle.
|
double |
getHalfAperture()
get the FOV half aperture angle.
|
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.
|
getCenter, getFootprint, getX, getY, getZ
getMargin
public CircularFieldOfView(Vector3D center, double halfAperture, double margin)
center
- direction of the FOV center, in spacecraft framehalfAperture
- FOV half aperture anglemargin
- angular margin to apply to the zone (if positive,
the Field Of View will consider points slightly outside of the
zone are still visible)public double getHalfAperture()
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 frameprotected Vector3D directionAt(double angle)
directionAt
in class SmoothFieldOfView
angle
- phase angle of the boundary directionCopyright © 2002-2020 CS Group. All rights reserved.