PCState:

--------------------------------------------------------------------------
   Computes the position and velocity of a satellite on the local ellipse 
   (Hills / Clohessy-Wiltshire) given the distance from the center (d),
   the orbital rate (w0), and the phasing angle (phi). 

   NOTE: Calling PCState with the M and t arguments will cause the state at 
         time t to be computed as follows:
              state(t) = PCState( d, w0, M(t)+phi )

   A circular chief orbit is assumed.

   Since version 7.
--------------------------------------------------------------------------
   Form:
   state = PCState( d, w0, phi, M, t )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d                 (1)     distance from reference point (km)
   w0                 (1)     orbital rate (rad/s)
   phi               (1)     phase angle, CW from y direction (deg)
   M                 (1)     current mean anomoly of chief orbit (deg)
   t                 (1)     elapsed time (sec)

   -------
   Outputs
   -------
   state            (6,1)    final state for the spacecraft in Hill's frame

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