On Thu, Jul 28, 2011 at 09:48:29PM -0500, Robert Love wrote:
> 
> Quaternions have a "handedness" or a sign convention.  The recently
> departed Space Shuttle used a Left versor convention while most
> things, including Space Station, use the right versor convention, in
> their flight software.  Made for frequent confusion.
> 
> Let me see if I can illustrate by showing the functions I use for
> converting a matrix to a quaternion.
> 
> [snip]

OK, the difference here is between quaternion conjugates. Your two
matrix-to-quaternion functions return the conjugate of each other, and
one of your rotate-vector-by-quaternion functions uses the conjugate of
the quaternion.

When quaternions are used to represent rotations, quaternion conjugates
represent "opposite" rotations.

E.g. if you have two spacecraft A and B and are considering the rotation
between them, you can describe this as the rotation from A->B or as the
rotation from B->A. The two quaternions will be the conjugate of each
other.

Similarly, if two systems describe the same rotation on the same axes
but one defines rotation using the right-hand rule and the other the
left-hand rule, their two quaternions will be the conjugate of each
other.

What this is all about is a matter of what co-ordinate frames you choose
to interpret things in, not something about a "handedness" of quaternions.
Quaternions themselves do not have a "handedness", they are just numbers.

If you have systems using opposite co-ordinate frames, or indeed any
other differing co-ordinate systems, then the best approach is to
explicitly convert everything into a single chosen co-ordinate frame
before doing any calculations. Don't entangle your representation
changes (e.g. matrix to quaternion) and transforms (e.g. rotate vector)
with co-ordinate frame changes.

Your 'left versor' functions are the correct ones. Your 'right versor'
functions create and use the opposite rotations. I don't know where you
got this 'left versor' and 'right versor' terminology from. This thread
seems to be the only hit for these terms together on Google.


Martin
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to