2021-03-24 05:29 AM
Hi,
I am using lsm6dsl sensor. I am getting data on out registers. How to convert that raw data into angle
Solved! Go to Solution.
2021-03-25 12:39 AM
Hi @Mkuma.4 ,
First, please note that the gyroscope output is an angular speed, i.e. it is measured in degree per second or in radiant per second.
So, if you want to get the angle value, you have to integrate your value in time, typically with a time base where dt = 1/ODR (the output data rate).
Second, the exact formula depends on the specific part number, especially on the sensitivity (and related Full Scale) and on the bit resolution. Taking for example the LSM6DSO IMU gyro, the can be found in the datasheet p.9 and the conversion formula from LSB to milli-dps in the FS=250dps case is the following one (lsm6dso_reg.c):
float_t lsm6dso_from_fs250_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 8.750f;
}
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon
2021-03-25 12:39 AM
Hi @Mkuma.4 ,
First, please note that the gyroscope output is an angular speed, i.e. it is measured in degree per second or in radiant per second.
So, if you want to get the angle value, you have to integrate your value in time, typically with a time base where dt = 1/ODR (the output data rate).
Second, the exact formula depends on the specific part number, especially on the sensitivity (and related Full Scale) and on the bit resolution. Taking for example the LSM6DSO IMU gyro, the can be found in the datasheet p.9 and the conversion formula from LSB to milli-dps in the FS=250dps case is the following one (lsm6dso_reg.c):
float_t lsm6dso_from_fs250_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 8.750f;
}
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon