Spacecraft formation flying is currently an important and thriving area of research, with plenty of unique challenges to overcome in the field of spacecraft dynamics. The guidance of the relative motion of a spacecraft formation is an area of particular interest. Many models for spacecraft formation flying exist, but all have their limitations, either in accuracy due to assumptions made in their derivation like using circular orbits or neglecting important orbit perturbations, or in computational efficiency by requiring numerical integration. This thesis presents a new set of analytical equations of motion describing the position of a follower spacecraft relative to a leader spacecraft in formation which is valid for eccentric orbits and which incorporates the so-called J2 perturbation. This set new equations is then validated for accuracy by comparison with a numerical simulator. Finally, the use of the equations for formation guidance is verified in a number of practical applications.