Class FieldOfViewDetector

    • Constructor Detail

      • FieldOfViewDetector

        public FieldOfViewDetector​(PVCoordinatesProvider pvTarget,
                                   FieldOfView fov)
        Build a new instance.

        The maximal interval between distance to FOV boundary checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

        Parameters:
        pvTarget - Position/velocity provider of the considered target
        fov - Field Of View
        Since:
        10.1
      • FieldOfViewDetector

        public FieldOfViewDetector​(PVCoordinatesProvider pvTarget,
                                   double radiusTarget,
                                   VisibilityTrigger trigger,
                                   FieldOfView fov)
        Build a new instance.

        The maximal interval between distance to FOV boundary checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.

        Parameters:
        pvTarget - Position/velocity provider of the considered target
        radiusTarget - radius of the target, considered to be a spherical body (m)
        trigger - visibility trigger for spherical bodies
        fov - Field Of View
        Since:
        10.1
      • FieldOfViewDetector

        protected FieldOfViewDetector​(AdaptableInterval maxCheck,
                                      double threshold,
                                      int maxIter,
                                      EventHandler handler,
                                      PVCoordinatesProvider pvTarget,
                                      double radiusTarget,
                                      VisibilityTrigger trigger,
                                      FieldOfView fov)
        Protected constructor with full parameters.

        This constructor is not public as users are expected to use the builder API with the various withXxx() methods to set up the instance in a readable manner without using a huge amount of parameters.

        Parameters:
        maxCheck - maximum checking interval
        threshold - convergence threshold (s)
        maxIter - maximum number of iterations in the event time search
        handler - event handler to call at event occurrences
        pvTarget - Position/velocity provider of the considered target
        radiusTarget - radius of the target, considered to be a spherical body (m)
        trigger - visibility trigger for spherical bodies
        fov - Field Of View
    • Method Detail

      • create

        protected FieldOfViewDetector create​(AdaptableInterval newMaxCheck,
                                             double newThreshold,
                                             int newMaxIter,
                                             EventHandler newHandler)
        Build a new instance.
        Specified by:
        create in class AbstractDetector<FieldOfViewDetector>
        Parameters:
        newMaxCheck - maximum checking interval (s)
        newThreshold - convergence threshold (s)
        newMaxIter - maximum number of iterations in the event time search
        newHandler - event handler to call at event occurrences
        Returns:
        a new instance of the appropriate sub-type WARNING: this method will be removed in 13.0. It doesn't have the deprecated annotation because the method is abstract and shall be implemented
      • getPVTarget

        public PVCoordinatesProvider getPVTarget()
        Get the position/velocity provider of the target .
        Returns:
        the position/velocity provider of the target
      • getFOV

        public FieldOfView getFOV()
        Get the Field Of View.
        Returns:
        Field Of View
        Since:
        10.1
      • g

        public double g​(SpacecraftState s)
        Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.

        The g function value is the angular offset between the target center and the Field Of View boundary, plus or minus the target angular radius depending on the VisibilityTrigger, minus the Field Of View margin. It is therefore negative if the target is visible within the Field Of View and positive if it is outside of the Field Of View.

        As per the previous definition, when the target enters the Field Of View, a decreasing event is generated, and when the target leaves the Field Of View, an increasing event is generated.

        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function