ViewRelativeMotion:

Path: FormationFlying/Visual

% View the relative motion for geometric goals
 View the relative motion associated with a set of geometric goals and a given
 reference orbit.

 Alternatively, the second input may be provided as a set of N orbital
 element vectors (Alfriend format) rather than geometric goals. (size Nx6)
--------------------------------------------------------------------------
   sc = ViewRelativeMotion( el0, goals, nOrbits );
               -or-
   sc = ViewRelativeMotion( el0, el, nOrbits );
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   el0             (1,6)     Reference orbital elements (Alfriend format) [a,th,i,q1,q2,W]
   g                (.)      Geometric goals data structure with following fields:
                                - y0     along-track offset                       [km]
                                - aE     semi-major axis of relative ellipse      [km]
                                - beta   angle on ellipse at perigee              [rad]
                                - zInc   cross-track amp. due to inc. diff        [km]
                                - zLan   cross-track amp. due to right ascen diff [km]
   nOrbits          (1)      Number of orbits to simulate  [orbits]

   -------
   Outputs
   -------
   sc               (.)      Data structure array of position, velocity, time data
                               for each spacecraft
     - r           (3,:)     Relative Hills frame position [km]
     - v           (3,:)     Relative Hills frame velocity [km/s]
     - t           (1,:)     Time [sec]

--------------------------------------------------------------------------
  See also AnimationGUI
--------------------------------------------------------------------------