Heading Examples

Heading Examples

Starting with an object pointing along the +x axis, we can apply yaw (CCW rotation around the +z axis), then pitch (downward tilt along the +y′ axis), then roll (CCW rotation along the +x′′ axis) to achieve the object's final orientation. If the yaw, pitch, and roll angles are α, β, γ respectively, then the orientation of the object is given by ɋo = ɋαɋβɋγ where:

In the case of a camera, since the optical axis of the camera is its +z axis, rather than the +x axis, we need to apply another transformation ɋT, which maps +z to +x, +x to -y, and +y to -z, transforming the orientation of the camera (relative to a camera pointing along the +x axis) to the camera heading:

Thus, the final heading quaternion for a camera is: ɋ = ɋo ɋT = ɋαɋβɋγ ɋT.