experience and innovation

Now Hiring!

-------------------------------------------------------------------------------
   Computes relative coordinates between two orbits.
   Find relative coordinates between an orbit defined by r and v
   and orbit with position vector r2. This coordinate system uses Kaplan's
   convention and is consistent with LinOrb. 
-------------------------------------------------------------------------------
   Form:
   d = RelativeCoord( r, v, r2, v2 )
-------------------------------------------------------------------------------

   ------
   Inputs
   ------
   r               (3,:) Position vector
   v               (3,:) Velocity vector
   r2              (3,:) Second orbit
   v2              (3,:) Second orbit

   -------
   Outputs
   -------
   d               (3,:) Relative position [dr;rtheta;z]
                   (6,:) And velocity if v2 is entered

-------------------------------------------------------------------------------
   References:	 Kaplan, M. H., Modern Spacecraft Dynamics and Control
                J. Wiley, 1986, pp. 109-111.
-------------------------------------------------------------------------------