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$ – Carl Witthoft Aug 7 '18 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$ – Guido Muscioni Aug 8 '18 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$ – Mahendra Gunawardena Aug 10 '18 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$ – Guido Muscioni Aug 10 '18 at 6:35
  • $\begingroup$ Any reason you want to use gyro data? $\endgroup$ – Mahendra Gunawardena Aug 11 '18 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.