GuidedLaunch2DRHS:

--------------------------------------------------------------------------
   The right hand side of a guided 2D launch model.

   The states are vertical and horizontal position, velocity
   and flight path angle. The model assumes a flat Earth that
   isn't rotating. The model can handle multiple stages and different
   fuels for each stage. The dry masses and exhaust velocities are entered
   using the data structure d. For each stage you add a fuel state to x.
   Thus a 3 stage vehicle will have 7 states and d.mSS, d.thrust,
   d.uE and d.cDA (the drag coefficient) will each have three entries.

   The control function has the form:
      alpha = fControl( x )

   Has a drag model with an exponential atmosphere.

   Since version 1.0
--------------------------------------------------------------------------
   Form:
   [xDot,alpha] = GuidedLaunch2DRHS( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x           (:,1)  [x h v gamma massFuel]
   t           (1,1)  Time (not used)
   d            (.)   Data structure
                      .rocket    (.)  Rocket data structure
                      .cDA      (1,:) Drag coefficient of each stage times area
                      .mu       (1,1) Gravitational constant (km/s^2)
                      .Rp       (1,1) Planet radius (km)
                      .fThrust  (1,1) Function handle for thrust model
                      .fControl {1,:} Array of function handles to
                                      determine thrust angle for each
                                      stage. Takes "x" as input.
                      .drag      (.)  Drag data structure

   -------
   Outputs
   -------
   xDot        (:,1)  Derivatives
   alpha       (1,1)  Control angle

--------------------------------------------------------------------------
	  References:	Wiesel, W. E., Spaceflight Dynamics, McGraw-Hill, 1988,
               pp. 207-211.
--------------------------------------------------------------------------
   See also LaunchVehicle2D, LaunchRHSData, LiftAndDragJonesSearsHaack
--------------------------------------------------------------------------

Children:

ACPro: ACProAerodynamics/LiftAndDragJonesSearsHaack
AeroUtils: AtmosphericCalculations/AtmDens2
Common: Atmosphere/StdAtm