Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  JBIU  >  MATRIX2QUATERNION

MATRIX2QUATERNION

MATRIX2QUATERNION

Name


    MATRIX2QUATERNION

Purpose


    Transforms a rotation matrix into a quaternion.

Category


    Math

Calling Sequence


    Result = MATRIX2QUATERNION(Rotmatrix)

Inputs


    Rotmatrix: A 3x3 rotation matrix.

Outputs


    The function returns the quaternion corresponding to the rotation
    specified by the rotation matrix.

Example


    IDL> theta=!PI/3.
    IDL> rm = [[COS(theta),0,-SIN(theta)],[0,1,0],[SIN(theta),0,COS(theta)]]
    IDL> quat = MATRIX2QUATERNION(rm)
    IDL> PRINT, quat
          0.00000 -0.50000 0.00000 0.866025

Modification History


    Written by: Jeremy Bailin
    27 Nov 2008 Released in JBIU



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us