dm = 0 kg/s
tfinal = 10 s
x = flatten(result_stage1[end,:])
x[3] = m2+m3+mp # New mass after stage seperation
result_interstage = ndsolve([drdt, dvdt, dmdt, dphidt, dgammadt, dtdt], x, dt, tfinal)
# Reset initial conditions for stage 2 flight
dm = 270.8 kg/s
isp_vac = 348 s
tfinal = 350 s
x = flatten(result_interstage[end,:])
result_stage2 = ndsolve([drdt, dvdt, dmdt, dphidt, dgammadt, dtdt], x, dt, tfinal)
# Reset initial conditions for unpowered flight
dm = 0 kg / s
tfinal = 900 s
dt = 10 s
x = flatten(result_stage2[end,:])
result_unpowered1 = ndsolve([drdt, dvdt, dmdt, dphidt, dgammadt, dtdt], x, dt, tfinal)
# Reset initial conditions for final orbit insertion
dm = 270.8 kg / s
tfinal = 39 s
dt = 0.5 s
x = flatten(result_unpowered1[end,:])
result_insertion = ndsolve([drdt, dvdt, dmdt, dphidt, dgammadt, dtdt], x, dt, tfinal)
# Reset initial conditions for unpowered flight
dm = 0 kg / s
tfinal = 250 s
dt = 10 s
x = flatten(result_insertion[end,:])
result_unpowered2 = ndsolve([drdt, dvdt, dmdt, dphidt, dgammadt, dtdt], x, dt, tfinal)`