BShuster2:

--------------------------------------------------------------------------
   Computes the solution to the attitude determination problem using
   Schuster's batch method. Uses sun angles, dihedral angles
   and chordwidths.

   Requires the corresponding sun vectors and nadir vectors. 

   The 4th and 5th inputs can either be leading and trailing edge times
   or chordwidths and mid-scan dihedral angles, respectively. The last 
   input must be set to either 'time' or 'angl'. The default is 'time'.
--------------------------------------------------------------------------
   Form:
   [ra,dec,p] = BShuster( usun, unadir, sa, tle_cw, tte_da, cant, eradius,
                          spinrate, threshold, dihedral, sigmas, sigmae, sigman, type )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   usun         (3,n)     Unit sun vector
   unadir       (3,n)     Unit nadir vectors
   sa           (1,n)     The angle between the sun line and the spin axis
   tle_cw                 Leading edge times (sec) or chordwidths (rad)
   tte_da                 Trailing edge time  (sec) or mid-scan dihedral angles (rad)
   cant                   Cant angle (rad)
   eradius      (1,n)     Angular radius of the earth (rad)
   spinrate               Spin rate (rad/sec)
   threshold              Threshold chord width (rad)
   dihedral               Dihedral angle of hsa (rad)
                          Send an empty matrix for chordwidths and mid-scan dihedral angles
   sigmas                 Standard deviation of each sun measurement
   sigmae                 Standard deviation of each nadir measurement
   sigman                 Standard deviation of each dihedral measurement
   type                   'time' = leading and trail edge times entered (default)
                          'angl' = chordwidths and dihedral angles entered

   -------
   Outputs
   -------
   ra                     Right ascension of the spin axis
   dec                    Declination of the spin axis
   p                      Covariance

--------------------------------------------------------------------------
	References:	Shuster, M.D., Efficient Algorithms for Spin-Axis Attitude
                 Determination, The Journal of the Astronautical Sciences,
                 Vol. XXXI, No. 2, April-June, 1983, pp. 237-249.
--------------------------------------------------------------------------

Children:

Math: Linear/Unit