2024-01-16 02:14 AM
Hi,
We're using the lsm6dsv's SFLP algorithm to calculate IMU rotation. Recently however we noticed that the resulting rotation has big gaps at around the 180degree mark. We believe this is because of the half float precision, specifically because there aren't a lot of representable values near 1. See below image for our calculated accuracy results which match the actual results we're seeing:
2025-01-20 10:01 AM
Hi Andrea,
thank you very much for the valuable insights!
How about the ISM330BX? Are the quaternion components also stored in such embedded advanced features registers and which are they?
Kind regards,
Felix
2025-01-21 08:52 AM
2025-01-22 01:36 AM - edited 2025-01-22 05:17 AM
Hi @Andrea VITALI ,
thank you very much, this seems to work.
However, I noticed quite some delay/lag between the quaternions obtained regularly from the FIFO and via the embedded advanced features registers. While the FIFO orientations are up to date, the ones obtained from registers 0x4C - 0x53 seem to be kind of low-pass filtered. This becomes an issue when I select a higher SFLP frequency such as 240Hz. For instance, at 240Hz when I flip the device by 90° it takes several seconds until the output orientation settles and approaches the correct values. It's better at 120Hz but still the orintation is delayed compared to the FIFO data. Any idea why this is the case?
EDIT: Nevermind. My I2C reads and writes were too slow causing the delays. Now it works just fine. Thanks again!
2025-01-22 08:03 AM - edited 2025-01-22 08:06 AM
Exactly :) the I2C slow readout process can cause delays.
The quaternion you read from the memory is identical to the quaternion you read from the FIFO, except that the one in the FIFO has the sign changed so that the qw component is always positive.
(Q = [qw,qx,qy,qz] represents the same orientation as -Q = [-qw, -qx, -qy, -qz], we need qw to have positive sign when we store qx,qy,qz in the FIFO so that we can reconstruct qw using +sqrt as discussed before)