BjarneBitscrambler / OrientationSensorFusion-ESP

Files for performing orientation sensor fusion using NXP version 7 algorithm, ported to Espressif platforms.
BSD 3-Clause "New" or "Revised" License
23 stars 12 forks source link

Implement method to report magnetic interference #20

Closed BjarneBitscrambler closed 3 years ago

BjarneBitscrambler commented 3 years ago

NXP's Sensor Fusion Toolbox displays a bargraph showing the reliability of the current magnetic calibration. It is desirable to add a method that reports the same/similar information to the library interface.

Some preliminary research shows that a combination of comparing the current magnetic field magnitude to the expected value, and the current magnetic field dip to the expected value, may be of use.

BjarneBitscrambler commented 3 years ago

Added reporting of several parameters relevant to the magnetic calibration:

These help decide whether calibration is good, but do not directly report magnetic interference.

BjarneBitscrambler commented 3 years ago

Added GetMagneticInclinationDeg(), GetMagneticInclinationRad(), and GetMagneticNoiseCovariance().

The Magnetic Inclination and Magnetic Noise Covariance are both good indicators of magnetic interference. See details in the wiki here: https://github.com/BjarneBitscrambler/OrientationSensorFusion-ESP/wiki/Magnetic-Interference