DJIFlightLimitation
@interface DJIFlightLimitation : NSObject
This class contains the flight status of the aircraft related to the flight limitation, and provides methods to configure the flight limitation.
-
YES
if the aircraft has reached the maximum flight height.Declaration
Objective-C
@property (readonly, nonatomic) BOOL hasReachedMaxFlightHeight;
-
YES
if the aircraft has reached the maximum flight radius.Declaration
Objective-C
@property (readonly, nonatomic) BOOL hasReachedMaxFlightRadius;
-
Sets the maximum flight height limitation for the aircraft. The
maxHeight
value must be in the range [20, 500] m.Declaration
Objective-C
- (void)setMaxFlightHeight:(float)maxHeight withCompletion:(DJICompletionBlock)completion;
Parameters
maxHeight
Maximum height for the aircraft.
completion
Completion block.
-
Gets the maximum flight height limitation from the aircraft.
Declaration
Objective-C
- (void)getMaxFlightHeightWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))completion;
-
Sets the maximum flight radius limitation for the aircraft. The radius is calculated from the home point. The
maxRadius
value must be in the range [15, 500] m.Declaration
Objective-C
- (void)setMaxFlightRadius:(float)maxRadius withCompletion:(DJICompletionBlock)completion;
Parameters
radius
Maximum flight radius for the aircraft.
completion
Completion block.
-
Gets the maximum flight radius limitation from the aircraft.
Declaration
Objective-C
- (void)getMaxFlightRadiusWithCompletion: (void (^_Nonnull)(float, NSError *_Nullable))completion;
-
Sets whether the maximum flight radius limitation is enabled. If
enabled
isNO
, there is no maximum flight radius limitation.Declaration
Objective-C
- (void)setMaxFlightRadiusLimitationEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)completion;
Parameters
enabled
Maximum flight radius limitation is enabled.
completion
Completion block.
-
Determines whether the maximum flight radius limitation is enabled.
Declaration
Objective-C
- (void)getMaxFlightRadiusLimitationEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;