multQtrn(3)

NAME
multQtrn, multLiQtrn, multRiQtrn, invertQtrn, unitQtrn, normQtrn -- RCCL routines to manipulate quaternions.

USAGE
#include <robotTypes.h> /* included as part of <rccl.h> */

multQtrn (qr, q1, q2)
  QTRN *qr, *q1, *q2;

multLiQtrn (qr, q1, q2)
  QTRN *qr, *q1, *q2;

multRiQtrn (qr, q1, q2)
  QTRN *qr, *q1, *q2;

invertQtrn (qr, q1)
  QTRN *qr, *q1;

unitQtrn (qr, q1);
  QTRN *qr, *q1;

float normQtrn (q1)
  QTRN *q1;

ARGUMENTS

qr --
    Result quaternion.

q1, q2 --
    Input quaternions.

DESCRIPTION
These routines perform operations on the quaternion data type QTRN.

multQtrn() computes the quaternion product
                qr = q1 q2 .

multLiQtrn() computes the quaternion product
                       -1
                qr = q1   q2 .

multRiQtrn() computes the quaternion product
                          -1
                qr = q1 q2 .

invertQtrn() computes the inverse of a quaternion:
                       -1
                qr = q1 .

unitQtrn() normalizes a quaternion:
                qr = q1 / |q1| .

Each of the above routines returns a pointer to its result argument.

normQtrn() returns the magnitude of a quaternion. This is not likely to be used much, since RCCL generally assumes the quaternions it uses are unit quaternions.

SEE ALSO
quaternion(3).