Hi all,
I have bought a breakout board for this NXP compass after having experimented with a Honeywell HMC5883, which was lacking because it cannot tilt-compensate the heading calculation.
I have i2c communication running correctly (I can read the product id and temperature as well as sensor data) but the issue I'm facing is that the fusion of the magnetometer and accelerometer using the adafruit libraries, as this source code demonstrates:
https://github.com/adafruit/Adafruit_AHRS/blob/master/Adafruit_Simple_AHRS.cpp
does not yield a 0-360 degrees smooth heading.
I am aware of Freescale libraries but the thing is that the adafruit software seems to be correct as well - hence me wondering whether I need to calibrate the device (I do not have an arduino board).
What are my options in doing so
Do you think the code I linked above is correct?
How do you suggest I proceed?
Thanks in advance
Hi Michael,
I suggest to play first on the magnetometer and accelerometer oversampling to make the heading calculation smoother.
The tables below have been extract from the datasheet:
For example, you can use the biggest OSR on the M-cell to have a low pass filtering effect on the data and make it smoother (example: ODR=12.5Hz/OSR=7). But it really depends on the responsiveness you need.
What are your current settings for the FXOS8700CQ?
Have a nice day,
Anthony