Skip to main content

AUTELCompass

class AUTELCompass

describe:This class defines information about magnetometers.

@protocol AUTELCompass <NSObject>

property heading

@property(nonatomic, readonly) double heading;

describe:This property indicates the direction of compass from –π to π. Sets 0 as north, -π/2 as west, π/2 as ease, π or –π as south. The value of heading equals to the value of AUTELMCSystemState.attitude.yaw


property hasError

@property(nonatomic, readonly) BOOL hasError;

describe:This property describes whether the compass has error or not. If Yes, the compass need calibration. The value of hasError equals to AUTELMCSystemState.isCompassError


property isCalibrating

@property(nonatomic, readonly) BOOL isCalibrating;

describe:Whether or not the compass is in calibrating.


property calibrationStatus

@property(nonatomic, readonly) AUTELCompassCalibrationStatus calibrationStatus;

describe:If isCalibration equals to Yes, this property indicates the status of calibration. AUTELCompassCalibrationStatus

Call startCalibrationWithCompletion method to trigger calibration mode. The order of calibration status is : AUTELCompassCalibrationNone -> AUTELCompassCalibrationStep1 -> AUTELCompassCalibrationStep2 -> AUTELCompassCalibrationCalculating -> AUTELCompassCalibrationSucceeded/AUTELCompassCalibrationFailed -> AUTELCompassCalibrationNone. The value of this property equals to AUTELMCSystemState.compassCalibrationStatus.


property compassInterferenceLevel

@property(nonatomic, readonly) AUTELCompassInterferenceLevel compassInterferenceLevel;

describe:The level of magnetic interference.

The value of this property equals to AUTELMCSystemState.compassInterferenceLevel . When compassInterferenceLevel is AUTELCompassInterferenceLevel4, hasErorr property sets to Yes.


method startCalibrationWithCompletion

- (void)startCalibrationWithCompletion:(AUTELCompletionBlock)block;

describe:Invoke this method to start compass calibration.

This method can be invoked when motors are on and returns AUTELSDKFlightControllerErrorMotorWorking error.

input parameter

block:completionBlock. AUTELCompletionBlock