Skip to main content
Graduate
January 6, 2024
Solved

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

  • January 6, 2024
  • 2 replies
  • 1834 views

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? 

    This topic has been closed for replies.
    Best answer by Federica Bossi

    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. 

    2 replies

    Technical Moderator
    January 8, 2024

    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. 

    Visitor II
    January 8, 2024

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

    VarshaAuthor
    Graduate
    January 8, 2024

    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.

    Graduate II
    January 8, 2024