Hi @TejasK ,
From the STM32Cube firmware package, locate the LSM6DSO sensor driver and add the driver files to your project. Then initialize the sensor in your code.
Add MotionFX files to your project and include MotionFX headers in your main code. Initialize the MotionFX library with sensor parameters (set sensor data rates and full scales matching your sensor configuration).
Store raw data in the format expected by MotionFX. Call the MotionFX processing function with raw sensor data. MotionFX will output orientation data, including quaternions and Euler angles.
Here are some useful links:
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.