RHSCubeSatRWA:

--------------------------------------------------------------------------
   Right-hand-side for a CubeSat orbit and attitude dynamical model.
   Includes magnetic disturbances, rigid body dynamics and power. 
   Uses a point-mass gravity model. Computes sun location with SunV1 and
   accounts for eclipses from the Earth.

   The states are: 
     [position; velocity; quaternion; angular velocity; wheel rates; charge]

   Can output the disturbance torques and power for post-processing.
--------------------------------------------------------------------------
   Form:
   [xDot,tMag,power] = RHSCubeSatRWA( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x        (17,1)  [r;v;q;w;wWheel;b]
   t         (1,1)  Time, sec
   d          (:)   Data structure
                    .jD0
                    .mass
                    .inertia
                    .mu
                    .power
                    .dipole
                    .atm
                    .planet
                    .skewOmegaEarth

   -------
   Outputs
   -------
   x        (14,1)  d[r;v;q;w;wWheel;b]/dt
   tMag     (3,1)   Magnetic torque
   power    (1,1)   Power from solar cells

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

Children:

Common: Coord/QForm
Common: Coord/QIToBDot
Common: Math/Cross
Common: Math/Mag
CubeSat: Power/SolarCellPower
SC: Environs/BDipole
SC: Ephem/Eclipse
SC: Ephem/SunV1