DJIIntelligentFlightAssistant
@interface DJIIntelligentFlightAssistant : NSObject
This class contains components of the Intelligent Flight Assistant and provides methods to change the settings of Intelligent Flight Assistant.
-
Intelligent flight assistant delegate.
Declaration
Objective-C
@property (readwrite, nonatomic) id<DJIIntelligentFlightAssistantDelegate> _Nullable delegate; -
Set collision avoidance enabled. When collision avoidance is enabled, the aircraft will stop and try to go around an obstacle when detected.
Declaration
Objective-C
- (void)setCollisionAvoidanceEnabled:(BOOL)enable withCompletion:(DJICompletionBlock)completion; -
Get collision avoidance enabled.
Declaration
Objective-C
- (void)getCollisionAvoidanceEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion; -
Set vision positioning enabled. Vision positioning is used to augment GPS to improve location accuracy when hovering and improve velocity calculation when flying.
Declaration
Objective-C
- (void)setVisionPositioningEnabled:(BOOL)enable withCompletion:(DJICompletionBlock)completion; -
Get vision position enable.
Declaration
Objective-C
- (void)getVisionPositioningEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion; -
Enables/disables precision landing. When enabled, the aircraft will record its take-off location visually (as well as with GPS). On a Return-To-Home action the aircraft will attempt to perform a precision landing using the additional visual information. This method only works on a Return-To-Home action when the home location is successfully recorded during take-off, and not changed during flight. It is supported by Phantom 4 Pro and Mavic Pro.
Declaration
Objective-C
- (void)setPrecisionLandingEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledYESto enable the precise landing.completionCompletion block that receives the setter result.
-
Gets if precision landing is enabled. It is supported by Phantom 4 Pro and Mavic Pro.
Declaration
Objective-C
- (void)getPrecisionLandingEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the getter result.
-
Enables/disables landing protection. During auto-landing, the downward facing vision sensor will check if the ground surface is flat enough for a safe landing. If it is not and landing proteciton is
YES, then landing will abort and need to be manually performed by the user. It is supported by Mavic Pro, Phantom 4 Pro and Inspire 2.Declaration
Objective-C
- (void)setLandingProtectionEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledYESto enable the landing protection.completionCompletion block that receives the setter result.
-
Gets if landing protection is enabled. It is supported by Mavic Pro, Phantom 4 Pro and Inspire 2.
Declaration
Objective-C
- (void)getLandingProtectionEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the getter result.
-
Enables/disables active obstacle avoidance. When enabled, and an obstacle is moving toward the aircraft, the aircraft will actively fly away from it. If while actively avoiding a moving obstacle, the aircraft detects another obstacle in its avoidance path, it will stop.
CollisionAvoidancemust also be enabled.Declaration
Objective-C
- (void)setActiveObstacleAvoidanceEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledYESto enable the active avoidance.completionCompletion block that receives the setter result.
-
Gets if active obstacle avoidance is enabled.
Declaration
Objective-C
- (void)getActiveObstacleAvoidanceEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the getter result.
-
Enables/disables upwards avoidance. When the infrared sensor on top of the Inspire 2 detects an obstacle, the aircraft will slow down the ascent speed and maintain a minimum distance (1 meter) from the obstacle. The sensor has a 10-degree horizontal field of view (FOV) and 10-degree vertical FOV. The maximum detection distance is 5 meters. It is supported by Inspire 2.
Declaration
Objective-C
- (void)setUpwardsAvoidanceEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;Parameters
enabledYESto enable the upwards avoidance.completionCompletion block that receives the setter result.
-
Gets if upwards avoidance is enabled. It is supported by Inspire 2.
Declaration
Objective-C
- (void)getUpwardsAvoidanceEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;Parameters
completionCompletion block that receives the getter result.
View on GitHub
DJIIntelligentFlightAssistant Class Reference