0

I want to use the quaternion data representing the attitude of a device (e.g. Android and iOS smartphones), during a movement task (e.g. arm movement), to calculate time derivatives of this angular data.

Since attitude is angular, the first derivative will be angular velocity, the second will be angular acceleration, and the third will be angular jerk.

How should this be done? I'm assuming such analyses can't be performed on the fly, but must be done after data are captured, but not sure what best to do.

rene
  • 41,474
  • 78
  • 114
  • 152
davwillev
  • 83
  • 10
  • By term _attitude_ you mean [generic orientation](https://en.wikipedia.org/wiki/Orientation_(geometry))? If so, Quaternions already represent this, and can be converted to 3x3 matrices representation which might be more familiar. You can either compute derivatives in the original representation leading to angular velocities (a bit involved), use simple quaternion differential (will result in a quaternion of "difference" between two quaternions), or convert to matrices and do the maths in matrix form. The choice probably depends on the application, and what you need to do with this data. – Martin Prazak Jun 13 '19 at 11:22
  • For direct quaternion differentiation, have a look here: http://web.cs.iastate.edu/~cs577/handouts/quaternion.pdf (I can expand into a full answer if you find this useful). – Martin Prazak Jun 13 '19 at 11:41
  • Thanks for this @MartinPrazak. I was thinking of calculating the difference quaternion of one attitude quaternion with the previous one. Somehow, I would need to do this for every 'event' measured by the device sensor. If so, this would give me angular differences from one timepoint to the next (albeit encoded within the quaternions), so I could calculate angular velocity. I guess I would then have to obtain time derivatives from this. – davwillev Jun 20 '19 at 13:07
  • The differential is a discrete sampled version of time-derivative, so I believe you already have what you are looking for there. As for converting to angular velocity, have a look at equation 27 of the PDF I've linked in the previous response (the text and equations around that part of the PDF describe the background). – Martin Prazak Jun 24 '19 at 10:58
  • Thanks @MartinPrazak. I'll look into that! – davwillev Jun 25 '19 at 11:25

0 Answers0