@interface DJICompass : NSObject
Header: DJICompass.h Inherits From:
This class provides compass status information and compass calibration methods. Products with multiple compasses (like the Phantom 4) have their compass state fused into one compass class for simplicity. Class Members:
@property( nonatomic, readonly) double heading Description:
Represents the heading, in degrees. True North is 0 degrees, positive heading is East of North, and negative heading is West of North. Heading bounds are [-180, 180].
@property( nonatomic, readonly) BOOL hasError Description:
YES if the compass has an error. If
YES, the compass needs calibration.
@property( nonatomic, readonly) BOOL isCalibrating Description:
YES if the compass is currently calibrating.
@property( nonatomic, readonly) DJICompassCalibrationState calibrationState Description:
Shows the calibration status. See Also:
Starts compass calibration. Make sure there are no magnets or metal objects near the compass. Input Parameters:
Stops compass calibration. Input Parameters:
typedef NS_ENUM ( NSUInteger, DJICompassCalibrationState) Description:
Compass Calibration Status. Enum Members:
DJICompassCalibrationStateNotCalibrating Normal state. Compass not in calibration. DJICompassCalibrationStateHorizontal Compass horizontal calibration. The user should hold the aircraft horizontally and rotate it 360 degrees. DJICompassCalibrationStateVertical Compass vertical calibration. The user should hold the aircraft vertically, with the nose pointed towards the ground, and rotate the aircraft 360 degrees. DJICompassCalibrationStateSuccessful Compass calibration succeeded. DJICompassCalibrationStateFailed Compass calibration failed. Make sure there are no magnets or metal objects near the compass and retry. DJICompassCalibrationStateUnknown Compass calibration status unknown.