diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index ef2552dc39..b1695d1fcb 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -523,7 +523,7 @@ void AP_Baro::update(void) if (sensors[i].healthy) { // update altitude calculation float ground_pressure = sensors[i].ground_pressure; - if (is_zero(ground_pressure) || isnan(ground_pressure) || isinf(ground_pressure)) { + if (!is_positive(ground_pressure) || isnan(ground_pressure) || isinf(ground_pressure)) { sensors[i].ground_pressure = sensors[i].pressure; } float altitude = sensors[i].altitude;