def test_4_target_velocities(): """ Calculate the velocities at the starting and ending positions """ results = find_target_velocities(earth, mars) assert number_fudger(results['V1'], 29.78) assert number_fudger(results['V2'], 24.007)
def test_3_transfer_period(): """ Find the period in seconds of the transfer orbit using Kepler's Third Law """ results = find_transfer_period(earth, mars) assert number_fudger(results, 44734138.6) assert number_fudger(results, (4.493 * 10**7))
def test_2_transfer_orbit(): """ Find the semimajor axis of the transfer orbit """ a_transfer = find_transfer_orbit(earth, mars) assert number_fudger(a_transfer, 188768611.5) assert number_fudger(a_transfer, 188000000)
def test_7_arrival_velocity(): """ Calculate the velocity at arrival """ results = find_velocity_at_destination(earth, mars) assert number_fudger(results, 21.476)
def test_6_insertion_velocity(): """ Calculate the change in velocity required to eject from p_start """ results = find_insertion_velocity(earth, mars) assert number_fudger(results, 2.946)
def test_8_final_injection_velocity(): """ Calculate the velocity required to inject into final orbit """ results = find_arrival_injection_velocity(earth, mars) * 1000 assert number_fudger(results, 2650)
def test_1_semi_major_axis(): """ Get the semi major axis of start and finish positions """ results = find_semimajor_axis(earth, mars) assert number_fudger(results['SMA Start'], 149598023) assert number_fudger(results['SMA Finish'], 227939200) # STEP 2 """ Note - Step 2 isn't being tested because it is a constant """ # STEP 3 """
def test_5_transfer_velocity(): """ Calculate the velocity of the transfer orbit at periapsis """ results = find_transfer_velocity(earth, mars) assert number_fudger(results, 32.731)