FRBWithMag:

Path: SC/Dynamics

% Rigid body right-hand-side with magnetic torque computed internally.
 Models a point-mass orbit.
 This function is called by RK4. See also MagneticControlSim.
--------------------------------------------------------------------------
   Form:
   xDot = FRBWithMag( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x            (13,1)    The state vector [r;v;q;w]
   t                      Time
   d             (.)      Data structure
                          .mu     (1,1) Gravitational parameter
                          .inr    (3,3) Inertia
                          .invInr (3,3) Inverse inertia
                          .tExt   (3,1) External torque
                          .bECI   (3,1) Magnetic field in ECI frame
                          .dipole (3,1) Magnetic dipole in spacecraft frame
                                            

   -------
   Outputs
   -------
   xDot         (13,1)    The derivative of the state vector

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

Children:

AerospaceUtils: Coord/QIToBDot
Common: Quaternion/QForm
Math: Linear/Cross
Math: Linear/Mag
SC: Dynamics/RBModel

Back to the SC Module page