Given a Chief and Deputy S/C with following initial orbital parameters:
CHIEF
%Chief orbital elements at initial time
a=6790.70030; %semi-major axis [kilometers]
enorm=0; %eccentricity.
inclination=51.30505; %inclination [degrees]
RAAN=284.05125; % right ascension of the ascending node [degrees]
arg_per=128.76998; % argument of perigee [degrees]
true_anomaly=39.75224; %True anomaly [degrees]
DEPUTY
%Deputy orbital elements at initial time
a=6788.70030; %semi-major axis [kilometers]
enorm=0.001; %eccentricity.
inclination=51.30505; %inclination [degrees]
RAAN=284.05125; % right ascension of the ascending node [degrees]
arg_per=128.76998; % argument of perigee [degrees]
true_anomaly=39.75224 + 0.001; %True anomaly [degrees]
Convert into state vectors the above parameters and integrate in Cartesian Coordinates the motions, with a time step of 1 second, for 10 hours.
Plot the relative position in x, y of LVLH (in plane) for the Deputy's position with respect to the Chief, in two ways, on the same graph:
1) directly from integrated state vectors in ECI (real, nonlinear relative motion).
2) using the initial relative position and velocity to integrate the CW equations.
Notice the difference as time goes by. Play with initial orbital elements to see what happens in various cases.