This function is used to decompose a rotation (or direction cosine) matrix into Euler angles, pitch, roll, and heading.

rotmat2euler(Q)

Arguments

Q

is a 3x3 rotation matrix.

Value

A 1x3 vector containing: prh=[p,r,h] where p is the pitch angle in radians, r is the roll angle in radians, and h is the heading or yaw angle in radians.