QFromU:

Path: SpacecraftEstimation/StellarAttDet

% Computes an attitude quaternion given a set of measured and cataloged
   unit vectors. The quaternion transforms from the catalog frame to the
   reference frame. The solution is found from:
 
   uMeas = m*uCatalog
   m     = uMeas*pinv(uCatalog);

   The number of columns should be >= 3 although 2 columns will give an
   m that is close to the correct matrix. The routine actually computes
   m and converts m to q.
--------------------------------------------------------------------------
   Form:
   [q, m] = QFromU( uCatalog, uMeas )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   uCatalog        (3,:)  Unit vectors from the catalog
   uMeas           (3,:)  Corresponding measured unit vectors

   -------
   Outputs
   -------
   q               (4,1)  Quaternion from reference
   m               (3,3)  Transformation matrix from reference

--------------------------------------------------------------------------

Children:

Common: Quaternion/Mat2Q
Common: Quaternion/Q2Mat
Common: Quaternion/QRand
Math: Linear/Orthogonalize
Math: Linear/Unit

Back to the SpacecraftEstimation Module page