GuidedLaunch3DRHS:

--------------------------------------------------------------------------
   Right hand side for 3D guided launch to orbit in ECI frame.
 
   Compute position, velocity, mass derivatives. The thrust direction is
   computed externally to this function and passed in. There is an option
   for including J2 effects from a full gravity model. Assumes a spherical
   earth and exponential atmosphere.

   See also RHSLaunchVehicle3D, MSThrustModel, AGravity.

   Since version 1.0
--------------------------------------------------------------------------
   Form:
   xDot = GuidedLaunch3DRHS( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x         (6+n,1)  State, [r v massFuel]
   t           (1,1)  Time since launch (sec)
   d            (.)   Data structure
                      .rocket     (.)  Rocket model
                      .cDA       (1,:) Drag coefficient of each stage times area (m^2)
                      .Rp        (1,1) Planet radius
                      .omegaE    (3,1) Planet rotation
                      .thrustOn  (1,1) Thrust on flag
                      .thrustDir (3,1) Thrust direction
                      .gravityModel

   -------
   Outputs
   -------
   xDot        (:,1)  Derivatives

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

Children:

AeroUtils: Coord/ECIToEF
Common: Control/Limit
Common: Time/JD2T
Common: Transform/RPhiTheta2Cart
LaunchVehicle: MultiStage/MSThrustModel
Math: Linear/Cross
Math: Linear/Mag
Orbit: OrbitMechanics/AGravity