cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Euler's angle Yaw,Pitch and Roll in lsm6dsv16bx

Varsha
Associate III

Is there any function I can use to calculate the yaw and pitch directly from the IMU? Or do I need to find the quaternion(SFLP) and then calculate Euler's angle on my own? 

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @Varsha ,

I think you are looking for the sensor fusion library to get quaternions and Euler angles.

You can refer to the MotionFX library of the X-CUBE-MEMS1 firmware function pack, which runs as middleware on STM32 and provides real-time motion-sensor data fusion. It also performs gyroscope bias and magnetometer hard iron calibration. 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Federica Bossi
ST Employee

Hi @Varsha ,

I think you are looking for the sensor fusion library to get quaternions and Euler angles.

You can refer to the MotionFX library of the X-CUBE-MEMS1 firmware function pack, which runs as middleware on STM32 and provides real-time motion-sensor data fusion. It also performs gyroscope bias and magnetometer hard iron calibration. 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
liaifat85
Senior III

You can find some additional clues here too: https://community.st.com/t5/mems-sensors/lsm6dsv-sflp/td-p/594883

After getting the quaternion values, How do i convert the quaternions to euler angles? can you please share some code/ documentation / link for the same.

I'd imagine examples are a search away..

https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..