% RT4
constants 

ve = 2700;
%---
rp = 300e3+R_E
v0 = sqrt(G*M_E/rp)

v = v0 + ve*log(2700/1450)

a = G*M_E/((2*G*M_E/rp) - v^2)

ra = 2*a - rp - R_E

e = (ra + rp)/(2*a)

T = sqrt((a^3*4*pi^2)/(G*M_E));

t = T/2/3600

% Alternate time computation.
Theta = pi;
E = 2*atan(tan(Theta/2)/((1+e)/1-e))
M = E-e*sin(E)
t = M*T/(2*pi)
t = t/3600