-
Notifications
You must be signed in to change notification settings - Fork 68
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
Comments
The calibration script is very simple now, but also not very good. We should still look:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: