TestLPCircular:

Path: FormationFlying/Analysis

% Test the LPEccentric function. 
 Provide the reference orbital elements, an  initial relative state and initial
 true anomaly, a desired/final relative state and final true anomaly, and the
 number of samples to discretize over.

 Two validation methods are used. In the first, we propagate the initial state
 over nS samples, applying the control acceleration found by LPEccentric. In
 the second, we integrate the two inertial states, applying the same control
 acceleration, but in the ECI frame. We then transform back to the Hill's frame
 for comparison.

--------------------------------------------------------------------------
   Form:
   [xH_int,xH_lin,dVTot,eT,err] = TestLPCircular( el0, xH0, xHF, dur, nS, plotFlag )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   el0             (6,1)  Initial orbital elements [a, i, W, w, e, M]
   xH0             (6,1)  Initial Hill's-frame state
   xHF             (6,1)  Final/desired Hill's-frame state
   dur              (1)   Maneuver duration [sec]
   nS               (1)   Number of samples to discretize over
   plotFlag         (1)   Create plots or not (0|1)

   -------
   Outputs
   -------
   xH_int          (6,1)  Hill's-frame state from integrating inertial states
   xH_lin          (6,1)  Hill's-frame state from propagating linear system
   dVTot            (1)   Total Delta-V for maneuver [m/s]
   eT               (1)   Time elapsed during call to LPEccentric [sec]
   err             (6,1)  State error at end of maneuver. Found by integrating
                          the inertial states from t=0 and applying control,
                          then comparing the final state with the target state.

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