2022-01-09 11:59 PM
Solved! Go to Solution.
2022-01-12 01:40 AM
Hi, you can refer to the datasheet or to the C drivers on Github.
In order to convert from LSB to physical units (in this case dps), you have to multiply the raw data (in LSB, obtained concatenating for example the OUT_X_H_G and the OUT_X_L_G, and casting the result into int16_t). Then, you have simply to multiply for 8.75, since the sensitivity is already expressed in milli-dps (so, no need to divide for 1000)
float_t lsm9ds1_from_fs245dps_to_mdps(int16_t lsb)
{
return ((float_t)lsb * 8.75f);
}
https://github.com/STMicroelectronics/lsm9ds1/tree/2d4d0282f4628c4eee820d55a48b8d3d8494e7c3
/Dk
2022-01-12 01:40 AM
Hi, you can refer to the datasheet or to the C drivers on Github.
In order to convert from LSB to physical units (in this case dps), you have to multiply the raw data (in LSB, obtained concatenating for example the OUT_X_H_G and the OUT_X_L_G, and casting the result into int16_t). Then, you have simply to multiply for 8.75, since the sensitivity is already expressed in milli-dps (so, no need to divide for 1000)
float_t lsm9ds1_from_fs245dps_to_mdps(int16_t lsb)
{
return ((float_t)lsb * 8.75f);
}
https://github.com/STMicroelectronics/lsm9ds1/tree/2d4d0282f4628c4eee820d55a48b8d3d8494e7c3
/Dk
2022-01-12 02:11 AM
Thanks for answer :)