Skip to main content
aktorh
Associate
January 10, 2022
Solved

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 ?

  • January 10, 2022
  • 2 replies
  • 1148 views

..

    This topic has been closed for replies.
    Best answer by DSull.3

    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

    2 replies

    DSull.3
    DSull.3Best answer
    Visitor II
    January 12, 2022

    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
    aktorhAuthor
    Associate
    January 12, 2022

    Thanks for answer :)