2024-10-12 12:27 AM
I'm doing a 4D orientation detection FSM on the ISM330BX. There is no example for this IMU so I'm following the examples for some of the other IMUs. That is fine and the code works, but what I can't work out is how to calculate the THRESH1 value and get it to agree with the value displayed in MEMS-Studio.
As shown in the attached screenshot, 0x3A66 (14950 in decimal) is shown as 0.8 g in MEMS-Studio for the ISM330BX, but if I work it out:
Value in g = 14950 x 0.000061 g/LSB = 0.913 g
Any ideas on what I am misunderstanding?
It doesn't really matter from a FSM perspective whether THRESH1 = 0.8 or 0.91 g but still...
Solved! Go to Solution.
2024-10-15 05:05 AM
Hi @reefwing ,
FSM thresholds are stored in registers in half-precision floating-point format, so 0x3A66 does not actually represents 14590, but 0.8.
Moreover, FSM threshold values are independent from full scale, and what is stored in registers is directly the value in g.
Therefore, 0x3A66 represents a threshold of 0.8 g independently from the selected full scale.
2024-10-15 05:05 AM
Hi @reefwing ,
FSM thresholds are stored in registers in half-precision floating-point format, so 0x3A66 does not actually represents 14590, but 0.8.
Moreover, FSM threshold values are independent from full scale, and what is stored in registers is directly the value in g.
Therefore, 0x3A66 represents a threshold of 0.8 g independently from the selected full scale.
2024-10-15 03:34 PM
Hi @Federica,
Thank you very much, it was driving me crazy that I couldn't work it out!