# Created by Octave 3.2.4, Tue Nov 23 12:52:53 2010 EST <mockbuild@jetta.math.Princeton.EDU.private>
# name: cache
# type: cell
# rows: 3
# columns: 11
# name: <cell-element>
# type: string
# elements: 1
# length: 8
demoquat
# name: <cell-element>
# type: string
# elements: 1
# length: 305
 -- Function File:  demoquat ()
     Demonstrate the functions available for manipulating quaternions.

     Thanks to Mr. Charles Hall, Dr. Don Krupp and Dr. Larry Mullins at
     NASA's Marshall Space Flight Center for notes and instruction in
     use and conventions with quaternions.  - A. S. Hodel


# name: <cell-element>
# type: string
# elements: 1
# length: 65
Demonstrate the functions available for manipulating quaternions.

# name: <cell-element>
# type: string
# elements: 1
# length: 5
qconj
# name: <cell-element>
# type: string
# elements: 1
# length: 154
 -- Function File:  qconj (Q)
     Conjugate of a quaternion.

          q = [w, x, y, z] = w*i + x*j + y*k + z
          qconj (q) = -w*i -x*j -y*k + z


# name: <cell-element>
# type: string
# elements: 1
# length: 26
Conjugate of a quaternion.

# name: <cell-element>
# type: string
# elements: 1
# length: 16
qcoordinate_plot
# name: <cell-element>
# type: string
# elements: 1
# length: 387
 -- Function File:  qcoordinate_plot (QF, QB, QV)
     Plot in the current figure a set of coordinate axes as viewed from
     the orientation specified by quaternion QV.  Inertial axes are
     also plotted:

    QF
          Quaternion from reference (x,y,z) to inertial.

    QB
          Quaternion from reference to body.

    QV
          Quaternion from reference to view angle.


# name: <cell-element>
# type: string
# elements: 1
# length: 80
Plot in the current figure a set of coordinate axes as viewed from the
orientati

# name: <cell-element>
# type: string
# elements: 1
# length: 6
qderiv
# name: <cell-element>
# type: string
# elements: 1
# length: 465
 -- Function File:  qderiv (omega)
     Derivative of a quaternion.

     Let Q be a quaternion to transform a vector from a fixed frame to
     a rotating frame.  If the rotating frame is rotating about the [x,
     y, z] axes at angular rates [wx, wy, wz], then the derivative of Q
     is given by

          Q' = qderivmat (omega) * Q

     If the passive convention is used (rotate the frame, not the
     vector), then

          Q' = -qderivmat (omega) * Q


# name: <cell-element>
# type: string
# elements: 1
# length: 27
Derivative of a quaternion.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
qderivmat
# name: <cell-element>
# type: string
# elements: 1
# length: 469
 -- Function File:  qderivmat (OMEGA)
     Derivative of a quaternion.

     Let Q be a quaternion to transform a vector from a fixed frame to
     a rotating frame.  If the rotating frame is rotating about the [x,
     y, z] axes at angular rates [wx, wy, wz], then the derivative of Q
     is given by

          Q' = qderivmat (omega) * Q

     If the passive convention is used (rotate the frame, not the
     vector), then

          Q' = -qderivmat (omega) * Q.


# name: <cell-element>
# type: string
# elements: 1
# length: 27
Derivative of a quaternion.

# name: <cell-element>
# type: string
# elements: 1
# length: 4
qinv
# name: <cell-element>
# type: string
# elements: 1
# length: 167
 -- Function File:  qinv (Q)
     Return the inverse of a quaternion.

          q = [w, x, y, z] = w*i + x*j + y*k + z
          qmult (q, qinv (q)) = 1 = [0 0 0 1]


# name: <cell-element>
# type: string
# elements: 1
# length: 35
Return the inverse of a quaternion.

# name: <cell-element>
# type: string
# elements: 1
# length: 5
qmult
# name: <cell-element>
# type: string
# elements: 1
# length: 283
 -- Function File:  qmult (A, B)
     Multiply two quaternions.

          [w, x, y, z] = w*i + x*j + y*k + z

     identities:

          i^2 = j^2 = k^2 = -1
          ij = k                 jk = i
          ki = j                 kj = -i
          ji = -k                ik = -j


# name: <cell-element>
# type: string
# elements: 1
# length: 25
Multiply two quaternions.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
qtrans
# name: <cell-element>
# type: string
# elements: 1
# length: 125
 -- Function File:  qtrans (V, Q)
     Transform the unit quaternion V by the unit quaternion Q.  Returns
     `V = Q*V/Q'.


# name: <cell-element>
# type: string
# elements: 1
# length: 57
Transform the unit quaternion V by the unit quaternion Q.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
qtransv
# name: <cell-element>
# type: string
# elements: 1
# length: 282
 -- Function File:  qtransv (V, Q)
     Transform the 3-D vector V by the unit quaternion Q.  Return a
     column vector.

          vi = (2*real(q)^2 - 1)*vb + 2*imag(q)*(imag(q)'*vb)
             + 2*real(q)*cross(imag(q),vb)

     Where imag(q) is a column vector of length 3.


# name: <cell-element>
# type: string
# elements: 1
# length: 52
Transform the 3-D vector V by the unit quaternion Q.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
qtransvmat
# name: <cell-element>
# type: string
# elements: 1
# length: 208
 -- Function File:  qtransvmat (QIB)
     Construct a 3x3 transformation matrix from quaternion QIB that is
     equivalent to rotation of th radians about axis VV, where `[VV,
     TH] = quaternion (QIB)'.


# name: <cell-element>
# type: string
# elements: 1
# length: 80
Construct a 3x3 transformation matrix from quaternion QIB that is
equivalent to 

# name: <cell-element>
# type: string
# elements: 1
# length: 10
quaternion
# name: <cell-element>
# type: string
# elements: 1
# length: 288
 -- Function File: [A, B, C, D] = quaternion (w)
 -- Function File: [VV, THETA] = quaternion (w)
 -- Function File: W = quaternion (A, B, C, D)
 -- Function File: W = quaternion (VV, THETA)
     Construct or extract a quaternion

          w = a*i + b*j + c*k + d

     from given data.


# name: <cell-element>
# type: string
# elements: 1
# length: 34
Construct or extract a quaternion


