MagControlThreeAxis:

Path: SC/MagneticControl

% Dipole vector needed to produce a torque given the magnetic field over time.
 This minimizes the weighted sum of the following cost functional:

   J = (t + Cross(b,m))'(t + Cross(b,m))' + m'm

 where t is constant over the period of time for which b is entered.

 If b is not entered it computes the magnetic field for an orbit 
 whose radius is 7000 km and inclination is 28.4 deg. The default t is
 [1e-5;-1e-5;2.e-5]. The demo is run by typing:

   MagControlThreeAxis

 The dipole results are in ATM^2. If there are no outputs, the function will 
 make plots of the user inputs.
--------------------------------------------------------------------------
   Form:
   [m, lambda, e] = MagControlThreeAxis( t, b, time )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   t               (3,1)   Torque
   b               (3,:)   Magnetic field vector in the torque frame
   time            (1,:)   Time vector corresponding to b

   -------
   Outputs
   -------
   m               (3,:)   Magnetic dipole vector needed
   lambda          (3,1)   Costates
   e               (3,1)   Torque error

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

Children:

AerospaceUtils: Coord/QLVLH
SC: BasicOrbit/RVFromKepler
SC: Environs/BDipole
SC: Visualization/PltOrbit
Common: Graphics/Plot2D
Common: Quaternion/QForm
Common: Time/JD2000
Math: Linear/Cross
Math: Linear/Mag
Math: Linear/SkewSq

Back to the SC Module page