PlanetOptimalTraj:

--------------------------------------------------------------------------
   Computes locally optimal solar sail control angles for planet-centric.

   Since version 7.
--------------------------------------------------------------------------
   Form:
   [alphaStar, psi] = PlanetOptimalTraj( dir, r, v, uSun )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   dir            (1,1)    Direction flag, +/- 1
   r              (3,:)    Position vector (km)
   v              (3,:)    Velocity vector (km/s)
   uSun    (3,:) or (3,1)  Sun vector in r/v frame

   -------
   Outputs
   -------
   alphaStar      (1,:)    Pitch angle
   psi            (1,:)    Flight path angle (velocity from sun)

--------------------------------------------------------------------------
	  Reference: Colin R. McInnes, "Solar Sailing: Technology, Dynamics and Mission
              Applications", Springer Praxis, London, 1999, pp. 156. 
--------------------------------------------------------------------------

Children:

Common: Graphics/Plot2D
Common: Time/Date2JD
Math: Linear/Cross
Math: Linear/Unit
SC: BasicOrbit/PltOrbit
SC: BasicOrbit/RVFromKepler
SC: Ephem/SunV1