function xdot = RoundEarth(t,x)
%   2-D Round-Earth equations of motion
%   Rob Stengel
%   March 10, 2024

%   x(1)    =   vx
%   x(2)    =   vy
%   x(3)    =   x
%   x(4)    =   y

    mu  =   3.98*10^5;  %   km^2/s^2
    r   =   sqrt(x(3)^2 + x(4)^2);
    
    xdot(1) =   -mu * x(3) / r^3;
    xdot(2) =   -mu * x(4) / r^3;
    xdot(3) =   x(1);
    xdot(4) =   x(2);
    xdot    =   xdot';
end

