MotionFX magnetometer calibration not always working
Hi everybody,
I use the motionFX with accelerometer, gyroscope and magnetometer (9X sensor fusion) but I have a problem using the magnetometer calibration.
I proceed as mentioned in the documentation of motionFX library:
- Call MotionFX_MagCal_init
- Call MotionFX_MagCal_run and MotionFX_MagCal_getParams in a loop until I get MFX_MAGCALGOOD quality
Some remarks:
- the magnetometer is very closed of dc motors, so there is very important hard iron bias.
- during the calibration, I do a 360 turn back and forth, on each axis. But most of the time, the calibration status doesn't change.
Sometimes, it is impossible to get a MFX_MAGCALGOOD quality, I only get MFX_MAGCALUNKNOWN.
I have a few questions:
- how MotionFX_MagCal_init and MotionFX_MagCal_run work? After how much time and after how many samples can we expect to have good calibration results?
- is there any restriction on the calibration algorithm about the hard iron bias range? (I mean, does calibration work with very high hard iron bias?)
- is the move I do during the calibration correct ? What move am I supposed to do during the calibration to be sure to get good calibration on any product?
- I noticed that on some products, the calibration is easily successful, but on others, it is impossible to achieve. Do you have any ideas on what could explain such difference?
Thanks for your time and your help
