CubeSatLunarEnvironment:

 Lunar environment calculations for the CubeSat dynamical model.

 Computes sun location with SunV1 and accounts for eclipses from the Earth and
 the Moon via Eclipse. All environment constants including gravity are defined
 here.
--------------------------------------------------------------------------
   Form:
   d 
   e = CubeSatLunarEnvironment( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x        (14,1)    [r;v;q;w;b]
   t         (1,1)    Time, sec
   d          (.)     Data structure
                      .jD0          Julian date of epoch
                      .surfData (.) optional; empty to skip optical calcs
                      .gravity  (.) 
                           .center  Index of gravity center

   -------
   Outputs
   -------
   env        (.)     Environmental data
                      .r            ECI position (km)
                      .v            ECI velocity (km/s)
                      .q            ECI to body quaternion
                      .mu           Gravitational constant (km3/s2)
                      .radiusPlanet Radius of the center planet (km)
                      .rho          Distance from the Moon (km)
                      .radiation    Planetary radiation W/m2
                      .albedo       Planet bond albedo fraction
                      .uSun         Sun unit vector (ECI)
                      .rSun         Sun distance (km)
                      .solarFlux    Solar flux at position (W/m2)
                      .nEcl         Eclipse fraction (source intensity, 0-1)
                      .accelGrav    Acceleration due to gravity
                      .rMoon        Moon position
                      .vMoon        Moon velocity
 
--------------------------------------------------------------------------
   See also SunV1, Eclipse, AtmDens2, AtmJ70, BDipole
--------------------------------------------------------------------------

Children:

Orbit: GravityModels/GravityNormalized
SC: Ephem/PlanetPosJPL