Rotate vector by quaternion
The quaternion has the form of
The vector has the form of
The rotated vector has the form of
|Quaternion or vector||Contains quaternions in the form of [q0, r0, ..., q1, r1, ... , q2, r2, ... , q3, r3, ...].|
|Vector||Contains vector or vector of vectors in the form of [v1, u1, ... , v2, u2, ... , v3, u3, ...].|
|Rotated quaternion or vector||Contains rotated vector or vector of rotated vectors.|
Stevens, Brian L., Frank L. Lewis, Aircraft Control and Simulation, Wiley–Interscience, 2nd Edition.