MagnetometerWith3StepCalibration
@objc(GSMagnetometerWith3StepCalibration)
public protocol MagnetometerWith3StepCalibration : Magnetometer
3-steps calibration magnetometer peripheral.
The calibration is done axis by axis, one after the other: roll, pitch and yaw. The order of axis calibration may vary depending on device.
This peripheral can be retrieved by:
drone.getPeripheral(Peripherals.magnetometerWith3StepCalibration)
-
Current state of the calibration process. Not
nil
if a calibration process is running,nil
otherwise.Note
To start a calibration process, use
startCalibrationProcess()
. At the end of the calibration process,calibrationProcessState
isnil
.Note
Even if each axis has been processed successfully during the calibration process, it is possible that the calibration process may be in error at the end (this may be due to a magnetic environment disturbing the calibration). See
calibrationProcessState.failed
.Declaration
Swift
var calibrationProcessState: Magnetometer3StepCalibrationProcessState? { get }
-
Starts the calibration process.
After this call,
calibrationProcessState
should not be nil as the process has started. The process ends either when all axes are recalibrated or when you callcancelCalibrationProcess()
.Note
No change if the process is already started.Declaration
Swift
func startCalibrationProcess()
-
Cancels the calibration process.
Cancel a process that has been started with
startCalibrationProcess()
. After this call,calibrationProcessState()
should return a null object as the process has ended.Note
No change if the process is not started.Declaration
Swift
func cancelCalibrationProcess()