cancel
Showing results for 
Search instead for 
Did you mean: 

Heading values of sensor fusion library incorrect?!

marten
Associate II

I noticed wrong values for heading when using 9x fusion library. When placing board flat on the table, then tilt and move it and replace it to the exact same position as before, the heading value differs by up to 90 degree. There seems to be an issue with the magnetic orientation in the library. Tilting the board without changing the orientation to north also results in wrong heading. I assume the heading values are tilt-compensated?!

Hardware: STM32L476RG Nucleo Board with IKS01A3 extension board

Software: CubeMx generated Demo Example "Sensor Fusion", FW version 7.2.0, Lib Version 2.4.0

Unicleo version: 1.12.0.10365

After running this example application I checked all sensor outputs. When moving and tilting the board the sensor values for Gyro,Acc and Mag seems to be reasonable.

Therefore I assume HW and SW are working as expected.

Could anybody pls. give some recommendations how to solve that issue.

I already created a ticket, but so far I got no response:

https://community.st.com/s/case/5003W000002c62b/motionfx-library-reports-wrong-heading-values

Best regards,

Marten

4 REPLIES 4
Eleon BORLINI
ST Employee

Hi @marten​ , it is usually suggested to perform a calibration of the magnetometer before launching the MotionFX library, and you basically can do the magnetometer calibration in two ways:

0693W000001q8aoQAA.png

Regards

marten
Associate II

Hi,

thx for the fast reply. I already calibrated the magnetometer using the push button function of the sample code. Calibration was successful.

But even for an uncalibrated sensor I don't understand why the orientation is changing when the board is placed on the table, than moved and finally put back to the exact same position on the table.

Regards,

Marten

marten
Associate II

0693W000001qdycQAA.jpg

marten
Associate II

please see the scatter plot after calibration. I also attached the data log of Unicleo GUI. The board is static at the table. The heading values are constant (but incorrect) while the heading error increases. What does the "heading error" value represent and why is it increasing.

Thx,

Marten