Class FieldOfView

  • All Implemented Interfaces:
    Serializable

    public class FieldOfView
    extends Object
    implements Serializable
    Class representing a spacecraft sensor Field Of View.

    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.

    Since:
    7.1
    Author:
    Luc Maisonobe
    See Also:
    FootprintOverlapDetector, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldOfView​(org.hipparchus.geometry.euclidean.threed.Vector3D center, org.hipparchus.geometry.euclidean.threed.Vector3D meridian, double insideRadius, int n, double margin)
      Build Field Of View with a regular polygon shape.
      FieldOfView​(org.hipparchus.geometry.euclidean.threed.Vector3D center, org.hipparchus.geometry.euclidean.threed.Vector3D axis1, double halfAperture1, org.hipparchus.geometry.euclidean.threed.Vector3D axis2, double halfAperture2, double margin)
      Build a Field Of View with dihedral shape (i.e.
      FieldOfView​(org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone, double margin)
      Build a new instance.
    • Constructor Detail

      • FieldOfView

        public FieldOfView​(org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet zone,
                           double margin)
        Build a new instance.
        Parameters:
        zone - interior of the Field Of View, in spacecraft frame
        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)
      • FieldOfView

        public FieldOfView​(org.hipparchus.geometry.euclidean.threed.Vector3D center,
                           org.hipparchus.geometry.euclidean.threed.Vector3D axis1,
                           double halfAperture1,
                           org.hipparchus.geometry.euclidean.threed.Vector3D axis2,
                           double halfAperture2,
                           double margin)
        Build a Field Of View with dihedral shape (i.e. rectangular shape).
        Parameters:
        center - Direction of the FOV center, in spacecraft frame
        axis1 - FOV dihedral axis 1, in spacecraft frame
        halfAperture1 - FOV dihedral half aperture angle 1, must be less than π/2, i.e. full dihedra must be smaller then an hemisphere
        axis2 - FOV dihedral axis 2, in spacecraft frame
        halfAperture2 - FOV dihedral half aperture angle 2, must be less than π/2, i.e. full dihedra must be smaller then an hemisphere
        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)
      • FieldOfView

        public FieldOfView​(org.hipparchus.geometry.euclidean.threed.Vector3D center,
                           org.hipparchus.geometry.euclidean.threed.Vector3D meridian,
                           double insideRadius,
                           int n,
                           double margin)
        Build Field Of View with a regular polygon shape.
        Parameters:
        center - center of the polygon (the center is in the inside part)
        meridian - point defining the reference meridian for middle of first edge
        insideRadius - 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 polygon
        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

      • getZone

        public org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet getZone()
        Get the interior zone.
        Returns:
        the interior zone
      • getMargin

        public double getMargin()
        Get the angular margin to apply (radians).
        Returns:
        the angular margin to apply (radians)
      • offsetFromBoundary

        public double offsetFromBoundary​(org.hipparchus.geometry.euclidean.threed.Vector3D lineOfSight)
        Get the angular offset of target point with respect to the Field Of View Boundary.

        The offset is roughly an angle with respect to the closest boundary point, corrected by the margin and using some approximation far from the Field Of View. It is positive if the target is outside of the Field Of view, negative inside, and zero if the point is exactly on the boundary (always taking the margin into account).

        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 is done, that underestimate the offset. This approximation is only performed about 0.01 radians outside of the zone and is 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 setup allows this offset to be used as a reliable way to detect Field Of View boundary crossings, 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 Field Of View canonical frame
        Returns:
        an angular offset negative if the target is visible within the Field Of View and positive if it is outside of the Field Of View, including the margin (note that this cannot take into account interposing bodies)