def circularization_phase(body, angle, thrust): simulation = ThrustSimulation( body, thrust / PROPELLANT_SPECIFIC_VELOCITY, f_gravity + f_drag + (lambda b: f_thrust(b, angle, thrust))) simulation.run( 300, dt=DELTA_T, condition=lambda b: abs(b.radial_speed) < 1) return simulation
def launch_phase(body, angle, thrust): simulation = ThrustSimulation( body, thrust / PROPELLANT_SPECIFIC_VELOCITY, f_gravity + f_drag + (lambda b: f_thrust(b, angle, thrust))) simulation.run( 300, dt=DELTA_T, condition=lambda b: b.radius > 1000 + MARS_RADIUS) return simulation