2021-12-17 06:20 PM
2021-12-21 12:26 AM
Hi @BChao ,
all ST gyroscopes outputs pitch, roll and yaw, not in physical units such as radians or degree per second (dps), but in LSB. Inertial measurement units do the same too. You have then to convert the LSB into dps according to the datasheet sensitivity. A typical conversion formula (for the LSM6DSO, that you can find on Github lsm6dso_reg.c) is:
float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 4.375f;
}
In this way (i.e. working in the digital domain), you can select different full scales, with different resolutions. So, the output is not the direct physical measure but you can just apply the conversion formula to get it. If you want to calculate the angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis.
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-12-21 12:26 AM
Hi @BChao ,
all ST gyroscopes outputs pitch, roll and yaw, not in physical units such as radians or degree per second (dps), but in LSB. Inertial measurement units do the same too. You have then to convert the LSB into dps according to the datasheet sensitivity. A typical conversion formula (for the LSM6DSO, that you can find on Github lsm6dso_reg.c) is:
float_t lsm6dso_from_fs125_to_mdps(int16_t lsb)
{
return ((float_t)lsb) * 4.375f;
}
In this way (i.e. working in the digital domain), you can select different full scales, with different resolutions. So, the output is not the direct physical measure but you can just apply the conversion formula to get it. If you want to calculate the angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis.
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-12-21 06:11 PM
By apply the conversion, I could only get the angular velocity(degree per second). My question is can I get the Euler angle such as pitch, roll, and yaw direct from the IMU output, it definitely not the same as angular velocity(degree per second).
2021-12-22 01:01 AM
Hi @BChao ,
roll, pitch and yaw are, by definition, angular rates (see for example here:(
So, the answer to your first question is correct, since roll, pitch and yaw are angular speed.
Unfortunately, ST (but I'm pretty sure also other vendors) doesn't have pure (euler) angular sensors.
Usually, in order to calculate these angle, you have to first calibrate the device and then integrate the data according to the 1/ODR time basis. More details: dt0060-exploiting-the-gyroscope-to-update-tilt-measurement-and-ecompass-stmicroelectronics.pdf
-Eleon
2022-01-03 02:37 PM
Simple open-source sensor fusion example for the LSM6DS1 here, outputs Euler angles...
2022-01-06 03:34 AM
Thanks a lot :D