Most common rotations are made for aerospace applications. Usually, the rotations are mostly made from earth (or inertial reference frame) to body reference frame. This causes for the DCM's to be the inverse or transpose of what the usual non-aerospace applications are used for. The to and from direction cosine matrix functions have this approach, as does the "quatrotate" function. Therefore the results, even though they "look" as if they are calculated using left-hand notation, have been calculated using right hand notation. They were calculated to use the most common approach in aerospace applications (inertial to body).
Workflow difference (quatrotate): There are two conventions for performing rotations. Aerospace Toolbox is using the rotation "convention most commonly used" as stated by Stevens and Lewis in quatrotate and the customer is using the other one. A potential solution is to make quatrotate more flexible with the type of rotation available as a choice. Would this be a workable solution for the customer?
1. "quatrotate" - rotates vector in inertial frame to body frame. Rational behind the choice of rotation equation in Aerospace Toolbox:
From: Stevens, Brian L., Frank L. Lewis, Aircraft Control and Simulation, Wiley-Interscience, 2nd Edition, page 18.
Workflow differences (DCM): The quat2dcm and dcm2quat functions are not incorrect, but does not return what the is expected. Below are the descriptions for each function:
quat2dcm - outputs DCM (inertial to body) from quaternion (body to inertial orientation -> right-handed rotation)
dcm2quat - outputs quaternion (body to inertial orientation -> right-handed rotation) from DCM (inertial to body)
Workflows are the same: The following functions are not affected by the handedness of the quaternion. * quatconj * quatdivide * quatinv * quatmod * quatmultiply * Aerospace Toolbox uses the calculation from Steven's calculation which matches the customer derivation, not the paper in question * quatnorm * quatnormalize
MathWorks is constantly taking into account the feedback regarding relevant functions in Aerospace Toolbox and blocks in Aerospace Blockset and we will enhance product documentation to include more information.
Best Answer