FEarthMoonSun:

Path: Orbit/RHSOrbit

% Orbit dynamics with spherical harmonic models of the Earth and Moon gravity.
 Includes a point mass sun model. Uses MoonV1 and SunV1 for ephemeris,
 EarthRot, MoonRot, and AGravityC for the gravity models, and APlanet for the
 sun perturbation. 

 Note that MoonV1 and SunV1 are low accuracy ephemeris models. For actual
 mission planning you will need to use more accurate solar and lunar
 ephemerides. In addition, you may need more accurate moon and earth rotation
 models. These models are suitable for mission design since the required
 delta-Vs won't change much but timing will. In addition, if you compare
 results using this model to models with different ephemerides, the results
 will not match.

 Designed to be called by ode113. See also EarthMoonSunSim.
--------------------------------------------------------------------------
   Form:
   varargout = FEarthMoonSun( t, x, flag, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   t                      Time (sec)
   x             (:,1)    The state vector [r;v]
   d              (.)     Data structure
                          .mass  (1,1) Mass
                          .force (3,1) External force
                          .earth (1,1)
                                      .mu (1.1) Gravitational potential
                                      .nZ (1.1) Number of zonal harmonics
                                      .nT (1.1) Number of tesseral harmonics
                                      .s  (:,:) S terms
                                      .c  (:,:) C terms
                                      .j  (:)   m = 0 terms
                                      .a  (1.1) Planet radius
                          .moon (1,1)
                                      .mu (1.1) Gravitational potential
                                      .nZ (1.1) Number of zonal harmonics
                                      .nT (1.1) Number of tesseral harmonics
                                      .s  (:,:) S terms
                                      .c  (:,:) C terms
                                      .j  (1,:) m = 0 terms
                                      .a  (1.1) Planet radius
                          .jDStart
                          .muSun

   -------
   Outputs
   -------
   vargout          (:,:)     Depends on flag

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

Children:

Orbit: GravityModels/LoadGEM
Orbit: GravityModels/NormalizationMatrix
Orbit: OrbitMechanics/AGravityC
Orbit: OrbitMechanics/APlanet
SC: Ephem/EOfE
SC: Ephem/EarthRot
SC: Ephem/GMSTime
SC: Ephem/MSidDay
SC: Ephem/MoonRot
SC: Ephem/MoonV1
SC: Ephem/NutDelta
SC: Ephem/ObOfE
SC: Ephem/SunV1
SC: SCMat/GEMT1
Common: CommonData/SwooshWatermark
Common: General/CellToMat
Common: General/DeBlankLT
Common: General/DispWithTitle
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/Mesh2
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Time/DTSToDTA
Common: Time/Date2JD
Common: Time/JD2000
Common: Time/JD2T
Common: Time/JDToMidnight
Math: Linear/DupVect
Math: Linear/Factorl
Math: Linear/Mag
Math: Linear/Unit
Math: MathUtils/R2P5
Math: Trigonometry/CosD
Math: Trigonometry/SinD

Back to the Orbit Module page