N.B. This file should be viewed using a fixed-width font. Quaternion Description ====================== The components of the QUATERNION keyword in a data label represent a rotation which transforms the components of a cartesian vector, expressed in the SDU_SPACECRAFT (Stardust spacecraft) reference frame, to the components of an equivalent vector expressed in the J2000 (EME J2000 inertial reference frame. The QUATERNION keyword value is an ordered list of the four components of the quaternion, Q , Q , Q , Q , with the first three components X Y Z A defining a cartesian vector, R, and the fourth component defining a scalar representing a rotation, THETA, about the vector R. The dot (a.k.a. scalar) product of the quaternion with itself is 1. R has identical components expressed in either frame. Converting the Quaternion to a Matrix ===================================== The linear expressions to form a transformation matrix from the four quaternion components are: +------------------+--------------------+-------------------+ | 2 2 | | | | 1 - 2 ( Q + Q ) | 2 ( Q Q - Q Q ) | 2 ( Q Q + Q Q ) | | Y Z | X Y A Z | X Z A Y | +------------------+--------------------+-------------------+ | | 2 2 | | M = | 2 ( Q Q + Q Q ) | 1 - 2 ( Q + Q ) | 2 ( Q Q - Q Q ) | | X Y A Z | X Z | Y Z A X | +------------------+--------------------+-------------------+ | | | 2 2 | | 2 ( Q Q - Q Q ) | 2 ( Q Q + Q Q ) | 1 - 2 ( Q + Q ) | | X Z A Y | Y Z A X | X Y | +------------------+--------------------+-------------------+ M, as defined here, is a 3x3 matrix that transforms Cartesian coordinates, expressed in the spacecraft frame, to coordinates, expressed in the EME J2000 frame, such that the two sets of coordinates represent the same vector. Using the Matrix to Transform Vectors ===================================== The matrix transforms coordinates as follows: if a vector v has coordinates (x, y, z) in the spacecraft reference frame, then an equivalent vector v' has coordinates (x', y', z') in the EME J2000 frame, where M v = v' and the left-hand side of that equation expresses matrix-by-vector multiplication. Each row of M is the unit vector, expressed in the SDU_SPACECRAFT frame, which is equivalent to a principal axis of the J2000 frame; the top, middle and bottom rows correspond to the X, Y and Z axes, respectively, of the J2000 frame. The x', y' and z' components are the dot (a.k.a. scalar) products of v with each of the top, middle and bottom rows, respectively, of the M matrix. Specifically, 2 2 x' = x [1-2(Q + Q )] + y [2(Q Q - Q Q )] + z [2(Q Q + Q Q )] Y Z X Y A Z X Z A Y 2 2 y' = x [2(Q Q + Q Q )] + y [1-2(Q + Q )] + z [2(Q Q - Q Q )] X Y A Z X Z Y Z A X 2 2 z' = x [2(Q Q - Q Q )] + y [2(Q Q + Q Q )] + z [1-2(Q + Q )] X Z A Y Y Z A X X Y