Quaternion differentiation
Parent:
Quaternion index
Source: J. D. Hol — Sensor fusion and calibration of inertial sensors, vision, ultra-wideband and GPS
Using the identities:
http://math.stackexchange.com/questions/189185/quaternion-differentiation
Numerical differentiation (Euler)
http://math.stackexchange.com/questions/1896379/how-to-use-the-quaternion-derivative
$$
\begin{aligned}
q(t+dt) &= q(t) \otimes dq\
\dfrac{dq}{dt} &= \frac{1}{2} \omega \otimes q
\quad \text{with }
\omega = \left[
\begin{array}{cccc}
0 & \omega_x & \omega_y & \omega_z
\end{array}
\right]^\text{T}
\end{aligned}$$
Integrating this, assuming $\omega=\text{const.}$ from $t_0$ to $t_0 + dt$:
$$
\begin{aligned}
q(t) &= q(t_0) \exp \left( \frac{1}{2} \omega \cdot \left( t - t_0\right) \right)\
\rightarrow dq &= \exp \left( \frac{1}{2} \omega \cdot dt \right)
\end{aligned}
$$