2021-11-22 11:52 AM
2021-11-23 02:04 AM
Hi, you just have to apply first the conversion from LSB into milli -g, as for example described in the https://github.com/STMicroelectronics/lsm303ah/blob/master/lsm303ah_reg.c
float_t lsm303ah_from_fs2g_to_mg(int16_t lsb)
{
return ((float_t)lsb * 0.061f);
}
Since a milli-g is 10^-3 * 9.81m/s^2, if you want inches or feet you have to apply the conversion from meter into the target units:
2021-11-23 02:04 AM
Hi, you just have to apply first the conversion from LSB into milli -g, as for example described in the https://github.com/STMicroelectronics/lsm303ah/blob/master/lsm303ah_reg.c
float_t lsm303ah_from_fs2g_to_mg(int16_t lsb)
{
return ((float_t)lsb * 0.061f);
}
Since a milli-g is 10^-3 * 9.81m/s^2, if you want inches or feet you have to apply the conversion from meter into the target units: