Concatenating a series of rotation quaternions resulting from local angular velocities

geometrylinear algebraquaternionsrotations

I have a time series of rotation quaternions $q_t$ generated from an IMU's angular velocity readings. These rotations are in the local coordinate frame. I would like to produce a series of absolute orientation quaternions $Q_t$ resulting from concatenating the $q_t$ values together.

Given $Q_0 = 1$, an obvious choice for the absolute orientation would be $Q_t = q_t Q_{t-1}$. However, this is applying the local rotation represented by $q_t$ in the coordinate system of the current global orientation $Q_{t-1}$, which seems incorrect.

On the other hand, using $Q_t = Q_{t-1} q_t$ seems to apply the local rotations in "reverse chronological order", assuming successive left multiplication represents a successive series of rotations. This also seems incorrect.

I'm trying to figure out if the right answer is something like $Q_t = Q_{t-1} q_t Q_{t-1}^{-1}$, which (I think) rotates back from the current global orientation to the local coordinate system, then applies $q_t$, then rotates back to the global coordinate system. But this doesn't seem to produce a reasonable series of quaternion multiplications when expanded.

Any idea how to concatenate these values?

Best Answer

Given $Q_0 = 1$, an obvious choice for the absolute orientation would be $Q_t = q_t Q_{t-1}$. However, this is applying the local rotation represented by $q_t$ in the coordinate system of the current global orientation $Q_{t-1}$, which seems incorrect.

I think that the paragraph above is where you go wrong. The thing you want is in fact exactly $Q_t = q_t q_{t-1} \cdots q_1$.

I also want to caution you that accumulating these things is likely to give more-and-more-wrong global transformations, diverging from the truth fairly fast. You probably already know this, but just in case, I thought I'd mention it. There's a reason that the device returns local increments rather than a global rotation. :)