Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnetometer calibration script should be improved #14

Open
DavidEGrayson opened this issue Jul 10, 2014 · 1 comment
Open

Magnetometer calibration script should be improved #14

DavidEGrayson opened this issue Jul 10, 2014 · 1 comment

Comments

@DavidEGrayson
Copy link
Owner

The current minimu9-ahrs-calibrator script (in minimu9-ahrs version 2.0.0) takes about 18 minutes to run and sometimes produces totally invalid calibrations (along with a warning), so there is room for improvement.

The reason that it produces invalid calibrations is that the way it assigns a score to a given calibration is to see how close the scaled sample readings are to the unit sphere. The closer the points are to the unit sphere, the better the score. Sometimes the optimization routine realizes that it can make some of the calibration numbers really large, effectively squeezing all the sample readings into a very small area that is very close to the unit sphere. As it makes the numbers larger, the score of the calibration approaches the perfect score where everything is exactly on the unit sphere.

I suspect that with the current scoring, we are hoping for the optimization algorithm to find a local maximum, but sometimes it looks a little further than we would want and finds unreasonable calibrations that actually score better.

Maybe we should explore the new type of calibration routine provided by @thesummer in issue #8.

@DavidEGrayson
Copy link
Owner Author

DavidEGrayson commented Apr 16, 2017

The calibration script is very simple now, but also not very good. We should still look:

  1. what @thesummer did in issue Question about the yaw axis (magnetometer) values #8
  2. Jim Remington's posts on the Pololu forum, which include links to various resources
    1. sailboat instruments blog
    2. magneto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant