RHSLunarMission:

 Right hand side for a lunar mission simulation.

 Includes solar disburbances and the power model. Any number of reaction wheels
 can be simulated. Reaction wheels are optional. It also includes states for
 the IMU (gyro and accelerometer) bias.

 * The gravity model includes the Earth, Sun and the Moon.
   The Moon gravity model can have spherical harmonics.
 * The solar power model includes eclipses due to the Moon and Earth
   but not self-shadowing.

 You can select the Moon or Earth as the coordinate center for orbit
 propagation. Get the default data structure by typing:

   d = RHSLunarMission

 Set up the state name output by typing:

   RHSLunarMission( x );

 You must initialize the JPL ephemerides prior to using this function.
 Type:

   PlanetPosJPL( 'initialize', [0 3 10] );

--------------------------------------------------------------------------
   Forms:
           d = RHSLunarMission;            % data structure
               RHSLunarMission( x );       % initialize persistent variables
   [xDot, p] = RHSLunarMission( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x     (:,1)   State [rECI;vECI;qECIToBody;omega;massFuel;pBattery;
                        iMUBiasAccel;iMUBiasGyro;omegaRWA]
   t     (1,1)   Time
   d     (.)     Data structure
                      .jD0        (1,1) Julian date of epoch
                      .mass       (1,1) Spacecraft mass (kg)
                      .inertia    (3,3) Spacecraft inertia (kg-m2)
                      .power       (.)  Power data, see SolarCellPower 
                      .opticalModel * Handle, see CubeSatRadiationPressure
                      .surfData    (.)  optional; empty to skip optical calcs
                      .thruster    (.)
                      .rWA         (.)
                      .iMU         (.)
                      .gravity     (.)
                      .forceBody  (3,1)
                      .torqueBody (3,1)

   -------
   Outputs
   -------
   xDot  (:,1)   dx/dt
   p     (.)     Data structure with internally computed variables

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

Children:

Common: Quaternion/QForm
Common: Quaternion/QTForm
Common: Time/Date2JD
LunarCube: Simulation/CubeSatLunarEnvironment
SC: Ephem/PlanetPosJPL