# Why doesn't converting a difference quaternion to euler angles give angular velocity?

I can get the difference between two quaternions as

diff * q1 = q2  --->  diff = q2 * inverse(q1)

where:  inverse(q1) = conjugate(q1) / abs(q1)

and:  conjugate( quaternion(re, i, j, k) ) = quaternion(re, -i, -j, -k)


Intuitively, I can understand this diff as an "angular velocity" applied to q1 that brings it to q2 in unit time.

If I understood this section of Wikipedia correctly (which I probably don't)

Euler proved that the projections of the angular velocity pseudovector on each of these three axes is the derivative of its associated angle (which is equivalent to decomposing the instantaneous rotation into three instantaneous Euler rotations)

To actually get the angular velocity in the usual sense, I could just convert diff into euler angles.

However, this gives me different results from other sources which calculate the angular velocity more rigorously.

I would assume the more rigorous calculation is correct. My question is, what went wrong in my understanding?

• I recommend to study in detail Quaternions and spatial rotation before asking us to debug code. In short: a unit quaternion $q$ rotates a pure quaternion $p$ by conjugation $qpq^{-1}\,.$ Jun 30 at 11:56
• Yes I understand a quaternion rotates another quaternion. But given two quaternions, I can find the "difference" between the two quaternions expressed as another quaternion as diff = q2 * inverse(q1). And with this "difference quaternion", I should be able to convert that to an angular velocity. My question is why my method of converting this "difference quaternion" to angular velocity is wrong. Jun 30 at 13:06
• "Intuitively, I can understand this diff as an "angular velocity" applied to q1 that brings it to q2 in unit time." Is nonsense by what we both just said we understand. $q_2q_1^{-1}$ gives you $q_2$ when you ritght multiply it by $q_1\,.$ No conjugation, no pure quaternion. Hence no rotation and no angular velocity. Jun 30 at 13:12

By casting diff as a set of euler angles, what I get is not an angular velocity, but the euler angle rate of change. This is different from angular velocity in that angular velocity is usually expressed as the axis of rotation times speed of rotation (i.e. more akin to axis angle form) and expressed in the inertial frame (euler angles are not expressed in inertial frame).
• Yes, I think you put it more succinctly. What I was trying to say is that my incorrect method gives $[\dot \alpha, \dot \beta, \dot \gamma]$ (time derivatives of euler angles) which is different from $\omega$. I borrowed "Euler angle rate" from this video Jul 4 at 8:12