GravityTurnSim2D:

--------------------------------------------------------------------------
   Perform a gravity-turn simulation using RHSLaunchVehicle2D.
   At a fixed time, the flight path angle will be set discretely to the
   specified angle, resulting in a gravity-turn trajectory.

   The simulation is a fixed-step integration using RK4. The pitchover
   altitude and velocity will be printed to the screen if verbose is true.

   Since version 2015.1
--------------------------------------------------------------------------
   Form:
   [traj,t] = GravityTurnSim2D( d, pitchover, tPitch, verbose )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d            (.)   Data structure for RHSLaunchVehicle2D
                      .rocket       (.)   Rocket model from RocketDatabase
                      .cDA         (1,:)  Drag coefficient * area
                      .fControl     {:}   Array of function handles
   pitchover   (1,1)  Pitchover angle from vertical, degrees
   tPitch      (1,1)  Time of the pitchover maneuver
   verbose     (1,1)  Flag for verbose output

   -------
   Outputs
   -------
   traj         (.)   Output data structure
       .t      (1,n)  Time (s)
       .x      (:,n)  State [x h v gamma massFuel]'
       .angle  (1,n)  Control angle (rad)
       .mass   (1,n)  Vehicle mass (kg)
       .thrust (1,n)  Vehicle thrust (kN)
       .drag   (1,n)  Vehicle drag (kN)
       .pitch   (.)   Pitchover conditions
                      .t     Pitchover time
                      .angle Pitchover angle
                      .h0    Pitchover altitude
                      .v0    Pitchover velocity
 
--------------------------------------------------------------------------
   See also RHSLaunchVehicle2D, LaunchRHSData, RK4
--------------------------------------------------------------------------

Children:

Common: Graphics/Plot2D
Common: Graphics/TimeLabl
LaunchVehicle: LVDatabase/VonBraunRocket
LaunchVehicle: LaunchSim/LaunchRHSData
LaunchVehicle: LaunchSim/RocketDrag
Math: Integration/RK4
SC: BasicOrbit/VOrbit