I am trying to build pitch, roll and yaw from sensor readings of a 9 degree of freedom sensing device. The data look like that (in a .csv file):


I am not familiar with building this measures from these data and also I am not familiar with quaternions. This question is the only thing I have found to be related to mine questions (Calculating pitch, yaw, and roll from mag, acc, and gyro data), however, it is not using all the axis. Ideally, I want to build this vector and be able to visualize them in 3D (like cube animation that is made live from 9dof sensors and Arduino). Moreover, I want to be able to compute the heading from this data.

Can anyone help me, I have all my pipeline in python so it would be helpful to have advice on how to do that with python?

  • $\begingroup$ Do you have a reason to believe that all 9 inputs are required to calculate PRY? $\endgroup$ Commented Aug 7, 2018 at 19:42
  • 1
    $\begingroup$ I know that gyroscope and accelerometer are enough, but I forgot to specify that I have multiple sensors, so the magnetometer will allow me to know also the relative position in the devices group. $\endgroup$ Commented Aug 8, 2018 at 4:42
  • $\begingroup$ Base on your question you have sufficient information to calculate Roll, Pitch and Yaw. Also in the post you link there is a linked there is link to Arduino. If you still have question please comeback we will try to help. $\endgroup$ Commented Aug 10, 2018 at 0:30
  • $\begingroup$ Thank you Mahendra, however the code posted only use accelerometer, I want to use also gyro information. Am I missing something? $\endgroup$ Commented Aug 10, 2018 at 6:35
  • $\begingroup$ Any reason you want to use gyro data? $\endgroup$ Commented Aug 11, 2018 at 1:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.