Two's Complement for XL values
LSM6DSO Application Note, page 67: The value is expressed as a 16-bit word in two’s complement.
Question: is this a SIGNED or UNSIGNED value?
LSM6DSO Application Note, page 67: The value is expressed as a 16-bit word in two’s complement.
Question: is this a SIGNED or UNSIGNED value?
Hi @BDiva.1 ,
since it is reported in two's complement, it is a signed value (the physical principle interpretation is that acceleration can be negative if it is in the opposite verse -for example- of the earth gravity). You can check the direction of the acceleration / angular speed from the picture in the datasheet p.6:
LSB-to-physical units conversion formula (for the accelerometer) is the following one (lsm6dso_reg.c:(
float_t lsm6dso_from_fs2_to_mg(int16_t lsb)
{
return ((float_t)lsb) * 0.061f;
}If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.