def test_baro_pressure_at_10000m(): test_rocket = rm.Rocket() test_rocket.baro = sensors.Baro_Pressure_Sensor() test_rocket.temperature = -49.86 test_rocket.altitude = 10000 assert (abs(test_rocket.baro.update(test_rocket) - 26.5162) <= rm.TOLERANCE)
def test_baro_pressure_at_ground(): test_rocket = rm.Rocket() test_rocket.baro = sensors.Baro_Pressure_Sensor() test_rocket.temperature = 15.04 test_rocket.altitude = 0 assert (abs(test_rocket.baro.update(test_rocket) - 101.4009) <= rm.TOLERANCE)
def test_baro_pressure_at_20000m(): test_rocket = rm.Rocket() test_rocket.baro = sensors.Baro_Pressure_Sensor() test_rocket.temperature = -56.46 test_rocket.altitude = 20000 assert (abs(test_rocket.baro.update(test_rocket) - 5.5298) <= rm.TOLERANCE)