//***************************CXBN CONTROL TORUQE README*************************************//

PURPOSE:
This readme explains the files included in this directory.  Both files contain functions 
that generate control torques based upon the measured angular velocity and magnetic field 
vector.

FILES:

----------
Detumble.c
----------

  This file contains a function that takes the current time-averaged magnetic field vector 
  and a previous time-averaged magnetic field vector and returns three separate 0-255 
  digital values to be applied to the three separate magnetic torquing coils.  

  The duty cycle for measurement of the magnetic field is not determined in this function.  
  It was determined by Kevin Brown and incorporated into the system firmware. 

  To compile this function:

  gcc Detumble.c -o Detumble.o

-------------------------------
SunAcquisitionWithSolarPanels.c
-------------------------------

  This file contains a function that takes the solar panel currents, the current 
  time-averaged magnetic field vector, and the angular velocity vector (as measured by the 
  gyros), and returns three separate 0-255 digital values to be applied to the three 
  separate torquing coils.

  The duty cycle for measurement of the magnetic field is not determined in this function.  
  It was determined by Kevin Brown and incorporated into the system firmware.
   
  To compile this function:

  gcc SunAcquisitionWithSolarPanels.c -o SunAcquisitionWithSolarPanels.o


NOTES:
Neither of these files deals with the spin rate of the spacecraft about the z-axis.  That 
function still needs to be written.  Both functions simply attempt to eliminate any spin 
about the z-axis.
