def test_stagnation_pressure(): # subsonic case _, p, _, a = atm(11000) tas = 240 p_stagnation_expected = 34952.7493849545 p_stagnation = stagnation_pressure(p, a, tas) assert_almost_equal(p_stagnation, p_stagnation_expected) # supersonic case _, p, _, a = atm(11000) tas = 400 p_stagnation_expected = 65521.299596290904 p_stagnation = stagnation_pressure(p, a, tas) assert_almost_equal(p_stagnation, p_stagnation_expected)
def test_stagnation_pressure(): # subsonic case _, p, _, a = atmosphere(11000) tas = 240 #This value is hardcoded from the function result with the current costants p_stagnation_expected = 34962.95478339375 p_stagnation = stagnation_pressure(p, a, tas) assert_almost_equal(p_stagnation, p_stagnation_expected) #This value is hardcoded from the function result with the current costants # supersonic case _, p, _, a = atmosphere(11000) tas = 400 p_stagnation_expected = 65558.23180026768 p_stagnation = stagnation_pressure(p, a, tas) assert_almost_equal(p_stagnation, p_stagnation_expected)