STMicroelectronics / STMems_Standard_C_drivers

Platform-independent drivers for STMicroelectronics MEMS motion and environmental sensors, based on standard C programming language.
BSD 3-Clause "New" or "Revised" License
729 stars 518 forks source link

Losing sign of quaternion #158

Open Yaxit opened 1 year ago

Yaxit commented 1 year ago

Could someone please explain what is the output of the SFLP quaternion block? I see three half-floats are generated, and the fourth component is inferred from the game rotation being normalized. Is the fourth component the real part? Don't we lose the sign with this transformation?

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/8d7095f3891b2684585176692e6aca7945f1d77e/lsm6dsv16bx_STdC/examples/lsm6dsv16bx_sensor_fusion.c#L182