Gustavo José de Sousa's Posts (1)

Sort by

The Ardupilot flight stack has an embedded compass calibrator, which has the advantage of providing a consistent behavior across different GCSs. Another good point of the internal calibrator when comparing to the algorithms implemented in the popular GCSs is that it makes sure the samples collected are well distributed over a sphere in order to get good calibration parameters.

The calibrator can be triggered and stopped with MAVLink commands. MAVProxy is an example of a GCS that uses the internal calibration and the source code can be checked in the mavproxy_calibration.py module. During the calibration, Ardupilot keeps sending MAVLink messages informing the progress of the calibration. The calibration message is called MAG_CAL_PROGRESS 1 and two of its fields are completion_pct and completion_mask. The former is the overall percentage of the calibration completion and the latter is is a bitmask representing sections of a geodesic grid.

The goal of the completion_mask is to provide a picture on how the calibration is progressing with respect to the distribution of the samples collected and a way for the GCSs to somehow guide the user when she is performing the compass calibration, which would make the process faster than just letting the user rotate the vehicle randomly until the calibration is completed.

I recently implemented the completion_mask and the patch set was applied on master a few days ago. More details about it can be found in my personal blog.

Here is a link to a demo video.

Best,

Gustavo Sousa

Read more…