Okay I'm sure this is a stupid question and I'm either completely misusing this formula or I'm missing something obvious, but I can't for the life of me figure out how I'm supposed to apply an angular velocity vector to an orientation quaternion, despite finding the Quaternion Time Derivative formula on multiple websites.
From what I've read, you can take an angular velocity vector like (0, 0, 3.14) for a 180 degree turn around the Z axis each second, then use these values in a non-normalized quaternion with zero w (0 0 3.14 0) -- I'm using xyzw representation for my quaternions -- and then you can multiply it by a delta time and an orientation quaternion and divide it by two, then add it to the orientation quaternion, and that should properly rotate the orientation quaternion according to the velocity. The formula looks like this: Q' = Q + 0.5t(W x Q).
Anyway, when I went to try it with a delta time of one second, it didn't seem to work. I take a unit quaternion with no rotation:
(0 0 0 1)
then multiply it by the angular velocity quaternion (with the original on the right, as per the formula)
(0 0 3.14 0) x (0 0 0 1) = (0 0 3.14 0)
then divide that by two
(0 0 1.57 0)
then add it to the original quaternion
(0 0 1.57 1)
but when I apply this rotation, it's 0, 0, -115 in euler angles, not 0, 0, 180.
So yeah... does anyone know what the problem is? I'd rather avoid having to build a quaternion from axis-angles each frame if I can, since that would require sin and cos which are more costly than just arithmetic, and everyone seems to say this formula works just as well, but I'm not seeing it.