Class CircularFieldOfView

  • All Implemented Interfaces:
    FieldOfView

    public class CircularFieldOfView
    extends SmoothFieldOfView
    Class representing a spacecraft sensor Field Of View with circular shape.

    The field of view is defined by an axis and an half-aperture angle.

    Since:
    10.1
    Author:
    Luc Maisonobe
    • Constructor Detail

      • CircularFieldOfView

        public CircularFieldOfView​(Vector3D center,
                                   double halfAperture,
                                   double margin)
        Build a new instance.
        Parameters:
        center - direction of the FOV center, in spacecraft frame
        halfAperture - FOV half aperture angle
        margin - angular margin to apply to the zone (if positive, the Field Of View will consider points slightly outside of the zone are still visible)
    • Method Detail

      • getHalfAperture

        public double getHalfAperture()
        get the FOV half aperture angle.
        Returns:
        FOV half aperture angle
      • offsetFromBoundary

        public double offsetFromBoundary​(Vector3D lineOfSight,
                                         double angularRadius,
                                         VisibilityTrigger trigger)
        Get the offset of target body with respect to the Field Of View Boundary.

        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.

        Parameters:
        lineOfSight - line of sight from the center of the Field Of View support unit sphere to the target in spacecraft frame
        angularRadius - target body angular radius
        trigger - visibility trigger for spherical bodies
        Returns:
        an offset negative if the target is visible within the Field Of View and positive if it is outside of the Field Of View (note that this cannot take into account interposing bodies)
        See Also:
        FieldOfView.offsetFromBoundary(Vector3D, double, VisibilityTrigger)
      • projectToBoundary

        public Vector3D projectToBoundary​(Vector3D lineOfSight)
        Find the direction on Field Of View Boundary closest to a line of sight.
        Parameters:
        lineOfSight - line of sight from the center of the Field Of View support unit sphere to the target in spacecraft frame
        Returns:
        direction on Field Of View Boundary closest to a line of sight
      • directionAt

        protected Vector3D directionAt​(double angle)
        Get boundary direction at angle.
        Specified by:
        directionAt in class SmoothFieldOfView
        Parameters:
        angle - phase angle of the boundary direction
        Returns:
        boundary direction at phase angle in spacecraft frame