DJIVisionDetectionState

@interface DJIVisionDetectionState : NSObject

This class gives state information about the product’s vision sensors used for obstacle detection. The two types of sensors used are dual camera sensors operating in the visible spectrum (dual-camera sensor) and infrared time of flight (TOF) sensors. Note, Inspire 2’s upward facing infrared TOF sensor is not returned in this state. It is accessed through DJIVisionControlState.

  • YES if the aircraft is braking automatically to avoid collision.

    @deprecated Use isBraking in DJIVisionControlState instead.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isBraking;
  • The vision sensor’s position on the aircraft. For Phantom 4 Pro, there are 4 vision sensors on the aircraft. The sensors on the nose and tail are dual-camera sensors. The sensors on the left and right are infrared time-of-flight (TOF) sensors.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIVisionSensorPosition position;
  • YES if the vision sensor is working.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isSensorWorking;
  • Obstacle detection warning level for the vision sensor. Note: dual-camera vision sensors have a field of view (FOV) split into sectors. This warning level is a combination of all sectors.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIVisionSystemWarning systemWarning;
  • The distance to the closest detected obstacle in meters. It is only used when the sensor is an infrared TOF sensor. The valid range is [0.3, 5.0]. Phantom 4 Pro has two infrared sensors on the left and right of the product. Both sensors have a 70-degree horizontal field of view (FOV) and 20-degree vertical FOV. The value is always 0.0 if the sensor is a dual-camera sensor or the sensor is not working properly.

    Declaration

    Objective-C

    @property (readonly, nonatomic) double obstacleDistanceInMeters;
  • A dual-camera vision sensor can see an area 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 array contains the distance and warning information for each sector. Phantom 4, Mavic Pro and Inspire 2 have one dual-camera vision sensor in the nose of the aircraft. For Phantrom 4 Pro, the dual-camera vision sensors are on the nose and the tail. It is nil if it is an infrared sensor or the sensor is not working properly.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        NSArray<DJIVisionDetectionSector *> *detectionSectors;