Quick Accel/Magnetometer Calibration

Large or heavy vehicles cannot easily be rotated along all axes. Therefore, ArduPilot provides options for simple acceleration calibration and large vehicle mag calibration. Users can perform these calibrations simply using QGroundControl or Mission Planner.

I need to perform a simple calibration on PX4, and I’ve found the source code for the quick acceleration/magnetic calibration within the commander module. This can be executed via the NSH console with the command module. However, QGroundControl doesn’t offer the option to send calibration commands (e.g., MAV_CMD_FIXED_MAG_CAL_YAW, MAV_CMD_PREFLIGHT_CALIBRATION for quick accelerometer calibration). I understand that quick calibration is not recommended, but I need to use it. Is the absence of these features in QGroundControl simply due to them not being implemented, or is it a deliberate choice due to the potential for lower performance?

do you need to send both of those commands to start quick calibration? Just those 2 mavlink messages?

1 Like

From what I understand, there are two types of quick calibration: accel quick calibration and magnetometer quick calibration.

The accel quick calibration is started by sending the MAV_CMD_PREFLIGHT_CALIBRATION command with param5=4.0, and the magnetometer quick calibration is started by sending the MAV_CMD_FIXED_MAG_CAL_YAW command with param1=Yaw, Param3=latitude, and Param4=Longitude.

I have reviewed both the PX4 (commander.cpp) and QGroundControl (APMSensorsComponentController.cc) code, and it seems that these two commands are sufficient to start the quick calibration processes.

I was just on the PX4 community call. it appears it just wasnt implemented in QGC

1 Like

I appreciate your help and the time you took to get this information from the PX4 community call. Thanks again!