Skip to main content
Vkj.1
Associate II
September 14, 2021
Solved

How to calculate the angle for raw data of gyro LSM6DSO?

  • September 14, 2021
  • 1 reply
  • 1292 views

..

This topic has been closed for replies.
Best answer by TSand.1

Hi, since the gyro output is an angular rate, you have to integrate this rate in time. I saw online that the typical integration time base is given by 1/ODR; where the ODR is the output data rate. But you have to first reduce the device offset since it would be integrated over time resulting in an increasing error in the angular estimation. You have first also to convert the raw data into angular rate with the conversion formula that you can find for example on GitHub.

float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
 return ((float_t)lsb) * 4.375f;
}

1 reply

TSand.1
TSand.1Best answer
Visitor II
September 14, 2021

Hi, since the gyro output is an angular rate, you have to integrate this rate in time. I saw online that the typical integration time base is given by 1/ODR; where the ODR is the output data rate. But you have to first reduce the device offset since it would be integrated over time resulting in an increasing error in the angular estimation. You have first also to convert the raw data into angular rate with the conversion formula that you can find for example on GitHub.

float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
 return ((float_t)lsb) * 4.375f;
}