120 likes | 285 Views
Quaternion Rotations. Aero 401 – 2/8/2011. Why We Don’t Like Euler Angles. Singularities/ambiguities possible Requires sequence of angles to be useful We want to be able to rotate to any new orientation without relying on a sequence. Quaternion Definition.
E N D
Quaternion Rotations Aero 401 – 2/8/2011
Why We Don’t Like Euler Angles • Singularities/ambiguities possible • Requires sequence of angles to be useful We want to be able to rotate to any new orientation without relying on a sequence.
Quaternion Definition • For a rotation by the angle q about the unit vector e • This is equivalent to a single direction cosine matrix; however, it can rotate about any axis. • Constraints: emust be a unit vector
Properties • Negatives negate all 4 terms but perform no rotation • Conjugate negates imaginary part or real part • No rotation (identity) • Multiplication represents a rotation sequence (sum) • Rotation that represents a rotation from one attitude to another (difference)
Multiplication • This represents the rotation by q’ then q” yielding q • Can be used to make rotation sequences, i.e. pitch, roll, yaw • Write the sequence from left to right in order, but solve sequences from right to left (just like the notation with direction cosine matrixes)
Example like what is used in the simulation • Rotate from inertial space to commanded attitude • Rotation about pitch, roll, yaw, B (neutral attitude), Inclination of orbit, RAAN, Inclination of earth
Rotating a vector about a quaternion • G is a vector in the inertial reference frame • q rotates from inertial to a new reference frame • H is G expressed in the new reference frame • q can represent multiple rotations • To rotate in the opposite direction simply reverse the sign of q0, i.e. use the conjugate of q.
SatSim In the simulation software, we defined function that can be called to perform any of these operations. quat_mult(q1, q2, ans) rotate_vector_about_quat(q, vect_in, vect_out)
Kinematics This differential equation can be solved using numerical approximations. • B is the old attitude • w is the angular velocity in the B frame • q is the new attitude after delta t
A good reference: http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm