Hello to everyone. I am struggling a little on this one.
I purchased a HMC 5883 L for making a compass. After learning that it's not working when rolling/pitching, I purchased another module which is adafriut 9 dof , IMU + Acc + Mag.
basically the 9dof it's an FXOS8700 + FXAS21002.
Adafruit Precision NXP 9-DOF Breakout Board [FXOS8700 + FXAS21002] : ID 3463 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits ** This is the link in case somebody wants to check.
I am getting errors on FXOS8700 readings, and seems to be something about the calibration of the sensor itself.
Here we can see an image that i did while rotating 360 degrees both sensors, HMC on top and FXOS on bottom :
Red and blue are X and Y readings, Green is Z and yellow it's Heading.
We can see that QMC is doing a decent job keeping lines in order and returning a right heading value, going from 0 to 360.
However, FXOS it's not, i believe it's returning decent X and Y values but Z it's totally offset. There's no way on earth i can get a right reading on heading.
Both codes are doing the same, getting events X , Y , Z , and doing (atan2(mag_Y2, mag_X2)) , later converting to degrees to check the reading.
I tried playing little bit with the calibration to get that Z value better but I am not finding the way, I tried MotionCal.exe from teensy but no way neither.
Any help would be really appreciated.
Thanks a lot
Fede