cancel
Showing results for 
Search instead for 
Did you mean: 

Lsm9ds1 datasheet says, gyro sensitivity is 8.75 mdps/lsb for full scale +-245 dps. To convert raw data to mdps should we use 245/32768 or 8.75/1000.0 ?

aktorh
Associate
 
1 ACCEPTED SOLUTION

Accepted Solutions
DSull.3
Associate III

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

View solution in original post

2 REPLIES 2
DSull.3
Associate III

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

aktorh
Associate

Thanks for answer :)