Gauss-newton magfit.py - computes offsets (hard-iron) and scaling (soft-iron)

55 views
Skip to first unread message

Jonathan Challinger

unread,
Mar 19, 2014, 11:45:57 PM3/19/14
to drones-...@googlegroups.com
I translated APM's accelerometer scaling code to python:
https://github.com/jschall/magfit_scaling
It doesn't yet throw away outliers like tridge's magfit, but it may be better if it did. It produces much better results than magfit - see mag_field.png.

Even if we don't find scaling to be useful (I think we might as well do it), it still produces much better offsets because it doesn't make the assumption that there is no soft-iron error.

If we could introduce this in MP and APM Planner, that would be great. It still needs sanity checks and it should probably throw away the worst outliers and then run itself again several times like Tridge's magfit does.
figure_1.png
mag_field.png

Paul Riseborough

unread,
Mar 20, 2014, 6:07:02 AM3/20/14
to drones-...@googlegroups.com
Good work Jon,

Now I'm spending time looking at copter logs for EKF performance, I'm seeing a lot of evidence of scale factor errors, and also seeing that the current compass calibration offset estimates can still be out by 50 units or more.

I'm looking forward to seeing what happens to the EKF magnetometer innovations when we use scale factor corrected data
Reply all
Reply to author
Forward
0 new messages