Search code examples
stm32accelerometergyroscope

Exactly which library are we supposed to use if we want Roll, Pitch and Yaw data from the ISM330DLC acc and gyro sensor?


Currently, I'm working on a project where my job is to take Accelerometer, Gyroscope data and convert it into Roll, Pitch and Yaw.

So to achieve this we started working on the ISM330DLC sensor. To get the raw data we interfaced the example code successfully and then we included the DI library to convert the raw data into Roll, Pitch and Yaw. Lastly, we were printing the Roll, Pitch and Yaw angles on the UART.

After printing data, we observed suspicious data, for example, we kept the sensor in a steady position and then we observed Yaw angle value was 360 degrees at the same time roll and pitch angles were also changing randomly.

So after this, we dumped the .bin file which is provided in the Unico GUI folder. and again we observed the Roll, Pitch and Yaw. This time we observed that the values were changing according to the position.

Now can anyone please help me to understand whether it is a library issue or something else? which library exactly do I have to use if I want the Roll, Pitch and Yaw angles from the ISM330DLC sensor.


Solution

  • Now the issue is solved and we are using the Motion FX Library to get Roll, Pitch & Yaw.