Magnetometer Calibration Using Levenberg-Marquardt Algorithm

Recently I worked on a magnetometer calibration method. This method is based on Levenberg-Marquardt Algorithm (LMA), a non-linear least-squares optimization algorithm. The method is implemented on ArduPilot and PX4, an open-source flight controller firmware.

I have to admit, formulizing mathematical notion from code is not straightforward. I spent several days to learn from LMA basic and finally understanding the sphere fit and ellipsoid fit algorithm.

In case you are wondering about the mathematical part, I write the formulation of the algorithm on PDF since it can’t be viewed on WordPress (unless I pay more for the plugin).

Click here for the document.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s