HillsEqns:

--------------------------------------------------------------------------
   Closed form solution of relative orbital motion using Hills equations.

   Since version 7.
--------------------------------------------------------------------------
   Form:
   X = HillsEqns( Xo, w, t, flag )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   Xo              (6,nSC)     Initial state in Hills frame, length unit [L], velocity unit [L/sec]
                                * each column is the state of a s/c, [x; y; z; xdot; ydot; zdot]
   w                 (1)      Orbital Rate (rad/s)
   t                 (:)      time vector (sec)
   flag             (1,1)     If entered, the output is formatted as a (6,nSC) matrix.

   -------
   Outputs
   -------
   X               (nSC).r    Position field, (3,:) matrix
                        .v    Velocity field, (3,:) matrix
                        .t    Time field, (1,:) vector

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