help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Octave


From: A. Scottedward Hodel
Subject: Octave
Date: Fri, 23 Oct 1998 07:34:25 -0500

I've written a suite of quaternion-related m-files in Octave, including
a gnuplot "cartoon" that shows a body frame rotating per specified
Euler angles via a construct quaternion.  If there's any interest in
these being added to the Octave suite of m-files, let me know.  I'll
clean them up and document them a bit better and submit them to John
Eaton for inclusion in Octave.

Functions:
quaternion: 
    - construct a quaternion from 
        - 4 input variables (the real and i,j,k elements)
        - an eigenaxis (3-vector) and angle of rotation
    -extract from a quaternion
        - the real and i,j,k, elements
        - the eigenaxis and angle of rotation
qconj: the conjugate of a quaternion
qinv: the inverse of a quaternion
qtrans: transform a quaternion from one frame to another
        (qa*qb*qinv(qa))
qtransv: transform a 3-vector from one frame to another
qtransmat: construct 3x3  transformation matrix

another function that could be translated from some other simulation
code I'm working on is the derivative of a quaternion given 
instantaneous rotation rates about the reference frame axes.

The transformation routines use an active quaternion convention, i.e.,
the quaternions represent the rotation of the vectors in space, not the
rotation of the frame.  (Change of sign in the rotation angle.)

A S Hodel Assoc. Prof. Dept Elect Eng, Auburn Univ,AL  36849-5201
On leave at NASA Marshall Space Flight Center (205) 544-1426



reply via email to

[Prev in Thread] Current Thread [Next in Thread]