Class PythonSmoothFieldOfView

    • Constructor Detail

      • PythonSmoothFieldOfView

        public PythonSmoothFieldOfView​(Vector3D center,
                                       Vector3D primaryMeridian,
                                       double margin)
        Build a new instance.
        Parameters:
        center - direction of the FOV center (Zsmooth), in spacecraft frame
        primaryMeridian - vector defining the (+Xsmooth, Zsmooth) half-plane (it is allowed to have primaryMeridian not orthogonal to center as orthogonality will be fixed internally)
        margin - angular margin to apply to the zone (if positive, the Field Of View will consider points slightly outside of the
    • Method Detail

      • pythonExtension

        public void pythonExtension​(long pythonObject)
        Part of JCC Python interface to object
      • pythonExtension

        public long pythonExtension()
        Part of JCC Python interface to object
      • pythonDecRef

        public void pythonDecRef()
        Part of JCC Python interface to object
      • directionAt

        public 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
      • 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