In-Field Compass calibration
First time Compass Calibration:
Refer Compass Calibration under PX4 documentation.
Choose a location away from large metal objects or magnetic fields. Metal objects are not always obvious!
Avoid calibrating on top of workspace, near computers or next to a vehicle.
Partial "Quick" Calibration
This calibration is similar to the well-known figure-8 compass calibration done on a smartphone:
Hold the vehicle in front of you and randomly perform partial rotations on all its axes. 2-3 oscillations of ~30 degrees in every direction is usually sufficient.
Wait for the heading estimate to stabilize and verify that the compass rose is pointing to the correct direction (this can take a couple of seconds).
Note:
There is no start/stop for this type of calibration (the algorithm runs continuously when the vehicle is disarmed).
The calibration is immediately applied to the data (no reboot is required) but is saved to the calibration parameters after disarming the vehicle only (the calibration is lost if no arming/disarming sequence is performed between calibration and shutdown).
The amplitude and the speed of the partial rotations done in step 1 can affect the calibration quality. Following the advice above is usually enough.
Last updated