DJI Mobile SDK Documentation

      class ObstacleDetectionSector

      @EXClassNullAway
      class ObstacleDetectionSector
      Package:dji.common.flightcontroller
      SDK Key:FlightControllerKey.DETECTION_SECTORS
      Description:

      The vision system can see in front of the aircraft with a 60 degree horizontal field of view (FOV) and 55 degree vertical FOV. The horizontal FOV is split into four equal sectors, and this class gives the distance and warning level for one sector.

      Class Members:
      method getWarningLevel
      ObstacleDetectionSectorWarning getWarningLevel()
      Package:dji.common.flightcontroller
      Description:

      The warning level based on distance.

      Return:
      ObstacleDetectionSectorWarningAn enum value of ObstacleDetectionSectorWarning
      method getObstacleDistanceInMeters
      float getObstacleDistanceInMeters()
      Package:dji.common.flightcontroller
      Description:

      The detected obstacle distance to the aircraft in meters. The left and right obstacle avoidance system is a monocular vision system, so it can only detect whether there are obstacles. 0 represents no obstacles and 1 represents obstacles. For mavic 2 series, it only supports returning this value in T mode.

      Return:
      floatA float value.
      enum ObstacleDetectionSectorWarning
      @EXClassNullAway
      enum ObstacleDetectionSectorWarning
      Package:dji.common.flightcontroller
      Description:

      Distance warning returned by each sector of the front vision system. Warning Level 6 is the most serious level. For different aircraft, the same warning level will refer to different distances. Spark only supports the follow warning levels:

      Enum Members:
      INVALIDThe warning level is invalid. The sector cannot determine depth of the scene in front of it.
      LEVEL_1Warning level 1.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is over 10 meters.
      - Spark: the distance between the obstacle detected by the sector and the aircraft is over 4 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is over 20 meters.
      LEVEL_2Warning level 2.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is between 8 - 10 meters.
      - Spark: the distance between the obstacle detected by the sector and the aircraft is between 2 - 4 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is between 15 - 20 meters.
      LEVEL_3Warning level 3.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is between 6 - 8 meters.
      - Spark: the distance between the obstacle detected by the sector and the aircraft is less than 2 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is between 10 - 15 meters.
      LEVEL_4Warning level 4.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is between 4 - 6 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is between 6 - 10 meters. Spark does not support this warning level.
      LEVEL_5Warning level 5.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is between 2 - 4 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is between 3 - 6 meters. Spark does not support this warning level.
      LEVEL_6Warning level 6.
      - Phantom 4 and Mavic Pro: the distance between the obstacle detected by the sector and the aircraft is less than 2 meters.
      - Others: the distance between the obstacle detected by the sector and the aircraft is less than 3 meters. Spark does not support this warning level.
      UNKNOWNThe distance warning is unknown. This warning is returned when an exception occurs.
      Class Members: