class AUTELDroneMainController
@interface AUTELDroneMainController : NSObject
describe:Through AUTELDroneMainController, you can know the current state of the aircraft's mian controller, Get and set the main controller's parameters, and send orders to the main controller .
property drone
@property (weak, nonatomic, readonly) AUTELDrone * _Nullable drone;
describe:Returns an instance of AUTELDrone. drone.mainController is the same as self .
property mcDelegate
@property (weak, nonatomic) id<AUTELDroneMainControllerDelegate> _Nullable mcDelegate;
describe:Returns an instance of delegate .
Implement mainController:didUpdateSystemState function to get main controller current status. To get current status,invoke startUpdateMCSystemState function first When stopUpdateMCSystemState is called, mainController:didUpdateSystemState will not be invoked any more until startUpdateMCSystemState is called again .
property flightLimitation
@property (weak, nonatomic, readonly) NSObject<AUTELFlightLimitation> * _Nullable flightLimitation;
describe:Through AUTELFlightLimitation , you can read and write flight limitation parameters, such as maximum altitude and maximum horizontal speed .
property compass
@property (weak, nonatomic, readonly) NSObject<AUTELCompass> * _Nullable compass;
describe:Through AUTELCompass , you can get and set compass status. AUTELMCSystemState also includes compass status .
@property (nonatomic, readonly) AUTELNavigation * _Nonnull navigationManager;
describe:Manage auto navigation function, such as waypoints, orbit and follow me mission .
property flightAssistant
@property (nonatomic, readonly) AUTELFlightAssistant * _Nonnull flightAssistant;
describe:Through AUTELFlightAssistant , you can get all setting in flight .
property verticalControlMode
@property(nonatomic, assign) AUTELVirtualStickVerticalControlMode verticalControlMode;
describe:Vertical control mode , AUTELVirtualStickVerticalControlMode .
property rollPitchControlMode
@property(nonatomic, assign) AUTELVirtualStickRollPitchControlMode rollPitchControlMode;
describe:Roll/Pitch control mode , AUTELVirtualStickRollPitchControlMode .
property yawControlMode
@property(nonatomic, assign) AUTELVirtualStickYawControlMode yawControlMode;
describe:Yaw control mode , AUTELVirtualStickYawControlMode .
property firmwareVersion
@property(nonatomic, readonly) NSString * _Nullable firmwareVersion;
describe:firmware version .
property takeOffHeight
@property(nonatomic, assign, readonly) float takeOffHeight;
describe:take off height .
method startUpdateMCSystemState
- (void)startUpdateMCSystemState;
describe:Start to update main controller system state. After invoke this function, if app has a connected drone object, method mainController:didUpdateSystemState will be invoked. To stop updating main controller state, just call stopUpdateMCSystemState function .
method stopUpdateMCSystemState
- (void)stopUpdateMCSystemState;
describe:Stop updating main controller system state. By calling this function method mainController:didUpdateSystemState will not be able to invoked any more until method startUpdateMCSystemState is called again .
method setGoHomeDefaultAltitude:withCompletion
- (void)setGoHomeDefaultAltitude:(float)altitude withCompletion:(AUTELCompletionBlock)block;
describe:Set default go home altitude .
Set the default altitude relative to take off point, default altitude must be set before go home is triggered. This can be useful if user can foresees the obstacles on return path and set the default altitude higher than the obstacles. If current altitude is higher than (or equals to) default go home altitude, the aircraft will remian current altitude and fly back to the home point, If current altitude is lower than default go home altitude, the aircraft will ascend to default go home altitdue and then fly back to the home point. The valid range for the altitude is from 30m to 800m .
Default altitude value must be smaller than maximum flight altitude. We can invoke getMaxFlightHeightWithCompletion: and setMaxFlightHeight:withCompletion to read and write flight altitude limitation .
Input parameters:
altitude:Go home altitude in meter .
block:AUTELCompletionBlock,Completion block .
method getGoHomeDefaultAltitudeWithCompletion
- (void)getGoHomeDefaultAltitudeWithCompletion:(void(^_Nullable)(float altitude, NSError* _Nullable error))block;
describe:Get default go home altitude .
Input parameters:
block:Completion block. This block includes 2 parameters. One is altitude which indicates the default go home altitude, another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setForcedFlightEnable:withCompletion
- (void)setForcedFlightEnable:(BOOL)enable withCompletion:(AUTELCompletionBlock)block;
describe:Set forced flight mode.
Please be careful when calling this method. In forced flight mode, the aircraft cannot take off safely. For your flight safety, please take off on a flat ground.
Input parameters:
enable:YES if drone can enable Forced flight mode, else NO.
block:AUTELCompletionBlock,Completion block .
method getForcedFlightEnableWithCompletion
- (void)getForcedFlightEnableWithCompletion:(void(^_Nullable)(BOOL enable, NSError* _Nullable error))block;
describe:Get Forced flight setting.
Input parameters:
block:Completion block. This block includes 2 parameters. One is forced flight status , another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setInRoomModeEnable
- (void)setInRoomModeEnable:(BOOL)enable withCompletion:(AUTELCompletionBlock)block;
describe:Set the aircraft indoor mode enable switch.
Input parameters:
enable:YES if RC can enable indoor mode, else NO.
block:AUTELCompletionBlock,Completion block .
method getInRoomModeEnableWithCompletion
- (void)getInRoomModeEnableWithCompletion:(void(^_Nullable)(BOOL enable, NSError* _Nullable error))block;
describe:Get the aircraft indoor mode enable switch.
Input parameters:
block:Completion block. This block includes 2 parameters. One is aircraft indoor mode enable switch , another one is error which indicates error message. Error retuns nil if this function applies successfully.
method setFrontRearOAEnable
- (void)setFrontRearOAEnable:(BOOL)enable withCompletion:(AUTELCompletionBlock)block;
describe:Set front and rear obstacle avoidance switches.
Input parameters:
enable:YES Turn on the front and rear obstacle avoidance switch, else NO Turn off the front and rear obstacle avoidance switches.
block:AUTELCompletionBlock,Completion block .
method getFrontRearOAEnableWithCompletion
- (void)getFrontRearOAEnableWithCompletion:(void(^_Nullable)(BOOL enable, NSError* _Nullable error))block;
describe:Get front and rear obstacle avoidance switches.
Input parameters:
block:Completion block .
method setLeftRightOAEnable
- (void)setLeftRightOAEnable:(BOOL)enable withCompletion:(AUTELCompletionBlock)block;
describe:Set left and right obstacle avoidance switches.
Input parameters:
enable:YES Turn on the left and right obstacle avoidance switch, else NO Turn off the left and right obstacle avoidance switches.
block:AUTELCompletionBlock,Completion block .
method getLeftRightOAEnableWithCompletion
- (void)getLeftRightOAEnableWithCompletion:(void(^_Nullable)(BOOL enable, NSError* _Nullable error))block;
describe:Get left and right obstacle avoidance switches.
Input parameters:
block:Completion block .
method setTopOAEnable
- (void)setTopOAEnable:(BOOL)enable withCompletion:(AUTELCompletionBlock)block;
describe:Set top obstacle avoidance switches.
Input parameters:
enable: YES Turn on the top obstacle avoidance switch, else NO Turn off the top obstacle avoidance switches.
block:AUTELCompletionBlock,Completion block .
method getTopOAEnableWithCompletion
- (void)getTopOAEnableWithCompletion:(void(^_Nullable)(BOOL enable, NSError* _Nullable error))block;
describe:Get top obstacle avoidance switches.
Input parameters:
block:Completion block .
method startTakeoffWithCompletion
- (void)startTakeoffWithCompletion:(AUTELCompletionBlock)block;
describe:Aircraft starts to take off, and then hover at 1.2m height.
Motors must be on before invoke this function, or block returns AUTELSDKFlightControllerErrorMotorNotWork error. AUTELMCSystemState.isMotorWorking indicates the status of motors. AUTELMCSystemState.flightMode indicates the status of aircraft, if AUTELMCSystemState.flightMode equals to AutelMCFlightModeTakeoff, then aircraft will take off. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method startLandingWithCompletion
- (void)startLandingWithCompletion:(AUTELCompletionBlock)block;
describe:Call this function to start landing.
AUTELMCSystemState.flightMode indicates the status of aircraft, if AUTELMCSystemState.flightMode equals to AutelMCFlightModeLanding, then aircraft will start to land. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method cancelLandingWithComletion
- (void)cancelLandingWithComletion:(AUTELCompletionBlock)block;
describe:Cancel auto landing.
This function cancels auto land and let the aircraft hover in the air. It can be applied successfully only if it is invoked while aircraft is landing, else it returns AUTELSDKFlightControllerErrorModeError error.
AUTELMCSystemState.flightMode indicates the status of aircraft, if AUTELMCSystemState.flightMode dosn't equals to AutelMCFlightModeLanding, then aircraft will cancel auto landing. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method turnOnMotorWithCompletion
- (void)turnOnMotorWithCompletion:(AUTELCompletionBlock)block;
describe:Turn on the motors.
AUTELMCSystemState.isMotorWorking indicates the status of motors, if AUTELMCSystemState.isMotorWorking is YES, then motors are running. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method startGoHomeWithCompletion
- (void)startGoHomeWithCompletion:(AUTELCompletionBlock)block;
describe:Call this function to trigger aircraft go home. Aircraft will fly back to the home point and then auto land on the ground.
If compass is abnormal (The value of AUTELMCSystemState.isCompassError is YES) or GPS singal is weak (The value of AUTELMCSystemState.isGPSWeakWarning is YES) or home point is invalid (The value of AUTELMCSystemState.isHomeInvalid is YES), then block returns AUTELSDKFlightControllerErrorCompassError, AUTELSDKFlightControllerErrorBadGPS, AUTELSDKFlightControllerErrorHomePointNotRecord error message accordingly
AUTELMCSystemState.flightMode indicates the status of aircraft, if AUTELMCSystemState.flightMode equals to AutelMCFlightModeManualGoHome, then aircraft will start to go home. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method cancelGoHomeWithCompletion
- (void)cancelGoHomeWithCompletion:(AUTELCompletionBlock)block;
describe:Call this function to cancel go home.
This function can be applied successfully only if it is invoked while aircraft is going home, else it returns AUTELSDKFlightControllerErrorModeError error. If AUTELMCSystemState.isAutoFlyingToHomePoint is NO, then aircraft will cancel go home. The return value of block does not indicate the real status of aircraft, it only tells whether the main controller received the command or not.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method turnOnFrontLEDWithCompletion
- (void)turnOnFrontLEDWithCompletion:(AUTELCompletionBlock)block;
describe:Turn on front LED indicator light.
AUTELMCSystemState.isFrontLEDTurnOn indicates the status of front LED. Call turnOffFrontLEDWithCompletion function to turn off the front LED.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method turnOffFrontLEDWithCompletion
- (void)turnOffFrontLEDWithCompletion:(AUTELCompletionBlock)block;
describe:Turn off front LED indicator light.
If the front LED has an effect on recording or taking pictures, this function can be invoked to turn off the front LED. AUTELMCSystemState.isFrontLEDTurnOn indicates the status of front LED. Call turnOnFrontLEDWithCompletion function to turn on the front LED.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method turnOffAllLEDWithCompletion
- (void)turnOffAllLEDWithCompletion:(AUTELCompletionBlock)block;
describe:Turn off the aircraft and turn off the forearm lights and rear arm lights.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method photographFlashingLEDWithCompletion
- (void)photographFlashingLEDWithCompletion:(AUTELCompletionBlock)block;
describe:flashing LED indicator taking pictures.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method recordFlashingLEDWithCompletion
- (void)recordFlashingLEDWithCompletion:(AUTELCompletionBlock)block;
describe:flashing LED indicator recording.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method getFrontLEDStateWithCompletion
- (void)getFrontLEDStateWithCompletion:(void(^_Nullable)(BOOL isTurnOn, NSError * _Nullable error))block;
describe:Get front wall light switch status
Input parameters:
isTurnOn:front wall light switch status. YES:turnOn,NO:turnOff。
error:error
method getControlLEDStateWithCompletion
- (void)getControlLEDStateWithCompletion:(void(^_Nullable)(AUTELAircraftLedState state, NSError * _Nullable error))block;
describe:Get the status of the front and rear LED lights.
Input parameters:
state:the status of the front and rear LED lightsAUTELAircraftLedState。
error:error
method controlLEDWithCompletion:withCompletion
- (void)controlLEDWithCompletion:(AUTELAircraftLedState)state withCompletion:(AUTELCompletionBlock)block;
describe:Control the switch status of LED lights.
Input parameters:
state:the switch status of LED lightsAUTELAircraftLedState。
block:AUTELCompletionBlock,Completion block .
Output Parameters:none.
method setLowBatteryWarning:withCompletion
- (void)setLowBatteryWarning:(uint8_t)percent withCompletion:(AUTELCompletionBlock)block;
describe:Set low battery waning data, percentage of voltage in range [25, 50].
When battery current electricity volum is lower than the low battery warning threashold, AUTELMCSystemState.powerWarning returns a low battery warning message, and force the aircraft to go home.
Input parameters:
percent:percentage of voltage in range [25, 50]。
block:AUTELCompletionBlock,Completion block .
Output Parameters:none.
method getLowBatteryWarningWithCompletion
- (void)getLowBatteryWarningWithCompletion:(void(^_Nullable)(uint8_t percent, NSError* _Nullable error))block;
describe:Get low battery warning data.
When battery current electricity volum is lower than the low battery warning threashold, AUTELMCSystemState.powerWarning returns a low battery warning message, and force the aircraft to go home.
Input parameters:
percent:percentage of voltage in range [25, 50].
error:error
method setSeriousLowBattery:withCompletion
- (void)setSeriousLowBattery:(uint8_t)percent withCompletion:(AUTELCompletionBlock)block;
describe:Set serious low battery waning data, percentage of voltage in range [10, 25].
When battery current electricity volum is lower than the critical low battery warning threashold, AUTELMCSystemState.powerWarning returns a critical low battery warning message, and force the aircraft to land.
Input parameters:
percent:percent Percentage of serious low battery. in range [10, 25].
block:AUTELCompletionBlock,Completion block .
method getSeriousLowBatteryWarningwithCompletion
- (void)getSeriousLowBatteryWarningwithCompletion:(void(^_Nullable)(uint8_t percent, NSError* _Nullable error))block;
describe:Get serious low battery warning threashold in percentage.
When battery current electricity volum is lower than the critical low battery warning threashold, AUTELMCSystemState.powerWarning returns a critical low battery warning message, and force the aircraft to land.
Input parameters:
percent:percent Percentage of serious low battery. in range [10, 25].
error:error
method setHomePointAtCurrentGPSPositionWithComletion
- (void)setHomePointAtCurrentGPSPositionWithComletion:(AUTELCompletionBlock)block;
describe:Call this function to set aircraft current location as home point.
Get current aircraft location by read the value of AUTELMCSystemState.homeLocation.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method setHomePoint:withCompletion
- (void)setHomePoint:(CLLocationCoordinate2D)homePoint withCompletion:(AUTELCompletionBlock)block;
describe:Set a specific GPS coordinate as home point.
This function fails to apply if new home point is over 5km away from the aircraft, and block returns AUTELSDKFCErrorDesNewHomeTooFarAway error message. If this function applies successfully, the aircraft will return to new home point. Get current aircraft location by read the value of AUTELMCSystemState.homeLocation.
Input parameters:
homePoint:GPS coordinate of home point.
block:AUTELCompletionBlock,Completion block .
method startCalibrationIMUWithCompletion
- (void)startCalibrationIMUWithCompletion:(AUTELCompletionBlock)block;
describe:Invoke this method to start IMU calibration.
This method can be invoked when motors are on and returns AUTELSDKFlightControllerErrorMotorWorking error.
Input parameters:
block:AUTELCompletionBlock,Completion block .
method getDronBindInfoWithCompletion
- (void)getDronBindInfoWithCompletion:(void(^_Nullable)(AUTELDroneBindUserState bindState, NSString * _Nullable sn, NSError * _Nullable error))block;
describe:get aircraft binding information.
Input parameters:
bindState:aircraft binding state. AUTELDroneBindUserState。
sn:aircraft serial number。
error:error
method bindDroneWithCompletion
- (void)bindDroneWithCompletion:(AUTELCompletionBlock)block;
describe:set aircraft binding
Input parameters:
block:AUTELCompletionBlock,Completion block .
method setYawStickSensitivity:withCompletion
- (void)setYawStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the yaw axis joystick sensitivity
Input parameters:
sensitivity:the yaw axis joystick sensitivity , in range [0.2, 0.8] .
block:AUTELCompletionBlock,Completion block .
method getYawStickSensitivityWithCompletion
- (void)getYawStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get yaw axis joystick sensitivity
Input parameters:
sensitivity:the yaw axis joystick sensitivity , in range [0.2, 0.8] .
error:error
method setPitchAndRollStickSensitivity:withCompletion
- (void)setPitchAndRollStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the Pitch And Roll axis joystick sensitivity
Input parameters:
sensitivity:the Pitch And Roll axis joystick sensitivity , in range [0.2, 0.8] .
block:AUTELCompletionBlock,Completion block .
method getPitchAndRollStickSensitivityWithCompletion
- (void)getPitchAndRollStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get Pitch And Roll axis joystick sensitivity
Input parameters:
sensitivity:the Pitch And Roll axis joystick sensitivity , in range [0.2, 0.8] .
error:error
method setPitchStickSensitivity:withCompletion
- (void)setPitchStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the Pitch axis joystick sensitivity
Input parameters:
sensitivity:the Pitch axis joystick sensitivity , in range [0.2, 0.8] .
block:AUTELCompletionBlock,Completion block .
method getPitchStickSensitivityWithCompletion
- (void)getPitchStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get Pitch axis joystick sensitivity
Input parameters:
sensitivity:the Pitch axis joystick sensitivity , in range [0.2, 0.8] .
error:error
method setRollStickSensitivity:withCompletion
- (void)setRollStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the Roll axis joystick sensitivity
Input parameters:
sensitivity:the Roll axis joystick sensitivity , in range [0.2, 0.8] .
block:AUTELCompletionBlock,Completion block .
method getRollStickSensitivityWithCompletion
- (void)getRollStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get Roll axis joystick sensitivity
Input parameters:
sensitivity:the Roll axis joystick sensitivity , in range [0.2, 0.8] .
error:error
method setThrustStickSensitivity:withCompletion
- (void)setThrustStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the Thrust axis joystick sensitivity
Input parameters:
sensitivity:the Thrust axis joystick sensitivity , in range [0.2, 0.8] .
block:AUTELCompletionBlock,Completion block .
method getThrustStickSensitivityWithCompletion
- (void)getThrustStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get Thrust axis joystick sensitivity
Input parameters:
sensitivity:the Thrust axis joystick sensitivity , in range [0.2, 0.8] .
error:error
method setAttitudeStickSensitivity:withCompletion
- (void)setAttitudeStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the attitude sensitivity
Input parameters:
sensitivity:the attitude sensitivity , in range [0.2, 1.0]
block:AUTELCompletionBlock,Completion block .
method getAttitudeStickSensitivityWithCompletion
- (void)getAttitudeStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:get attitude sensitivity
Input parameters:
sensitivity:the attitude sensitivity , in range [0.2, 1.0]
error:error
method setBrakeStickSensitivity:withCompletion
- (void)setBrakeStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the brake sensitivity
Input parameters:
sensitivity:the brake sensitivity , in range [0.5, 2.0]
block:AUTELCompletionBlock,Completion block .
method getBrakeStickSensitivityWithCompletion
- (void)getBrakeStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:Get the brake sensitivity
Input parameters:
sensitivity:the brake sensitivity , in range [0.5, 2.0]
error:error
method setYawSchStickSensitivity:withCompletion
- (void)setYawSchStickSensitivity:(float)sensitivity withCompletion:(AUTELCompletionBlock)block;
describe:Set the yaw stroke sensitivity
Input parameters:
sensitivity:the yaw stroke sensitivity , in range [0.5, 2.5]
block:AUTELCompletionBlock,Completion block .
method getYawSchStickSensitivityWithCompletion
- (void)getYawSchStickSensitivityWithCompletion:(void(^_Nullable)(float sensitivity, NSError* _Nullable error))block;
describe:Get the yaw stroke sensitivity
Input parameters:
sensitivity:the yaw stroke sensitivity , in range [0.5, 2.5]
error:error
enum AUTELVirtualStickYawControlMode
typedef NS_ENUM (uint8_t, AUTELVirtualStickYawControlMode){
/**
* Sets the `VirtualStickControlMode` yaw values to be an angle relative to the front of the aircraft.
* Positive and negative yaw angle is for the aircraft rotating clockwise and counterclockwise,
* respectively. Maximum yaw angle is defined as `AUTELVirtualStickYawControlMaxAngle`. Minimum yaw
* angle is defined as `AUTELVirtualStickYawControlMinAngle`.
*/
AUTELVirtualStickYawControlModeAngle,
/**
* Sets the `VirtualStickControlMode` yaw values to be an angular velocity. Positive and negative
* angular velocity is for the aircraft rotating clockwise and counterclockwise, respectively. Maximum
* yaw angular velocity is defined as `AUTELVirtualStickYawControlMaxAngularVelocity`. Minimum yaw angular
* velocity is defined as `AUTELVirtualStickYawControlMinAngularVelocity`.
*/
AUTELVirtualStickYawControlModeAngularVelocity,
};
describe:Defines how manual yaw values are interpreted by the aircraft.
enum AUTELVirtualStickRollPitchControlMode
typedef NS_ENUM (uint8_t, AUTELVirtualStickRollPitchControlMode){
/**
* Sets the `VirtualStickControlMode` roll and pitch values to be an angle relative to
* a level aircraft. In the body coordinate system, positive and negative pitch angle is for the aircraft rotating about
* the y-axis in the positive direction or negative direction, respectively. Positive and negative roll angle is the positive direction or
* negative direction rotation angle about the x-axis, respectively.
* However in the ground coordinate system, positive and negative pitch angle is the angle value for the aircraft moving south and
* north, respectively. Positive and negative roll angle is the angle when the aircraft is moving east and west, respectively.
* Maximum angle is defined as `AUTELVirtualStickRollPitchControlMaxAngle`.
* Minimum angle is defined as `AUTELVirtualStickRollPitchControlMinAngle`.
*/
AUTELVirtualStickRollPitchControlModeAngle,
/**
* Sets the `VirtualStickControlMode` roll and pitch values to be a velocity.
* In the body coordinate system, positive and negative pitch velocity is for the aircraft moving towards the positive direction or
* negative direction along the pitch axis and y-axis, respectively. Positive and negative roll velocity is when the aircraft is moving towards
* the positive direction or negative direction along the roll axis and x-axis, respectively.
* However, in the ground coordinate system, positive and negative pitch velocity is for the aircraft moving east and west, respectively.
* Positive and negative roll velocity is when the aircraft is moving north and south, respectively.
* Maximum velocity is defined as `AUTELVirtualStickRollPitchControlMaxVelocity`.
* Minimum velocity is defined as `AUTELVirtualStickRollPitchControlMinVelocity`.
*/
AUTELVirtualStickRollPitchControlModeVelocity,
};
describe:Defines how manual roll and pitch values are interpreted by the aircraft.
enum AUTELVirtualStickVerticalControlMode
typedef NS_ENUM (uint8_t, AUTELVirtualStickVerticalControlMode){
/**
* Sets the Virtual Stick Control vertical control values to be a vertical velocity.
* Positive and negative vertical velocity is for the aircraft ascending and descending
* respectively. Maximum vertical velocity is defined as `AUTELVirtualStickVerticalControlMaxVelocity`.
* Minimum vertical velocity is defined as `AUTELVirtualStickVerticalControlMinVelocity`.
*/
AUTELVirtualStickVerticalControlModeVelocity,
/**
* Sets the `VirtualStickControlMode` vertical control values to be an altitude. Maximum position is defined as `AUTELVirtualStickVerticalControlMaxPosition`.
* Minimum position is defined as `AUTELVirtualStickVerticalControlMinPosition`.
*/
AUTELVirtualStickVerticalControlModePosition,
};
describe:Defines how vertical control values are interpreted by the aircraft.
protocol AUTELDroneMainControllerDelegate
@protocol AUTELDroneMainControllerDelegate <NSObject>
describe:This protocol provides delegate methods to update main controller's current state.
method mainController:didUpdateSystemState
- (void)mainController:(AUTELDroneMainController *_Nonnull)mc didUpdateSystemState:(AUTELMCSystemState *_Nonnull)state NS_SWIFT_NAME(mainController(_:didUpdateSystemState:));
describe:
Callback function that updates the main controller's current state data. This method gets
* called 5 times per second after startUpdateMCSystemState is called.
Input parameters:
mc:Instance of the main controller for which the data will be updated. AUTELDroneMainController
state:Current state of the main controller. AUTELMCSystemState
method mainController:didUpdateRTKState
- (void)mainController:(AUTELDroneMainController *_Nonnull)mc didUpdateRTKState:(AUTELRTKStatusInfoModel *_Nonnull)state NS_SWIFT_NAME(mainController(_:didUpdateRTKState:));
describe:This callback method updates the current status data of the aircraft's RTK. The flight controller reports once every 1s.
Input parameters:
mc:Instance of the main controller for which the data will be updated. AUTELDroneMainController
state:Current state of the RTK system AUTELRTKStatusInfoModel
method mainController:didUpdateRTKDiffData
- (void)mainController:(AUTELDroneMainController *_Nonnull)mc didUpdateRTKDiffData:(NSData *_Nonnull)data NS_SWIFT_NAME(mainController(_:didUpdateRTKDiffData:));
describe:This callback method updates the aircraft RTK differential data.
Input parameters:
mc:Instance of the main controller for which the data will be updated. AUTELDroneMainController
data:RTK differential data.
method mainController:didUpdateLTEModuleState
- (void)mainController:(AUTELDroneMainController *_Nonnull)mc didUpdateLTEModuleState:(AUTELLTEModuleInfoModel *_Nonnull)state NS_SWIFT_NAME(mainController(_:didUpdateLTEModuleState:));
describe:This callback method updates the current status data of the aircraft's LTE Module.
Input parameters:
mc:Instance of the main controller for which the data will be updated. AUTELDroneMainController
state:Current state of the LTE Module,AUTELLTEModuleInfoModel。