%RT3
constants
mu = G*M_E;

z = 300e3;
a1 = z+R_E
ve = 3e3;
me = 500; % empty mass
f = 50;

%---

v0 = visviva_circ(a1)

a2 = ((12*3600)^2*mu/(4*pi^2))^(1/3)

v1 = visviva_circ(a2)

vHTOp = visviva(a1, (a1+a2)/2)% Velocity at periapsis of Hohmann transfer orbit.
vHTOa = visviva(a2, (a1+a2)/2)

deltaV1 = vHTOp - v0
deltaV2 = v1 - vHTOa



m0 = me*exp((v1-vHTOa)/ve)*exp((vHTOp-v0)/ve);% Initial mass before the two burns, and assuming final mass = empty mass. ie. all fuel expended.
mf = m0-me % Mass of propellant required.

m1 = m0*exp((v0-vHTOp)/ve);% intermediate mass after burn1

dm1 = m0-m1;
tb1 = dm1/f

dm2 = m1-me;
tb2 = dm2/f
