Skip to content

Commit

Permalink
fixed the calculation for air density
Browse files Browse the repository at this point in the history
  • Loading branch information
JMoore5353 committed Dec 31, 2024
1 parent 9552981 commit af4b8da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ got_flags Sensors::run()
rf_.board_.baro_read(&data_.baro_pressure, &data_.baro_temperature);
correct_baro();

rho_ = (0.0289644 * data_.baro_pressure) / (8.31432 * data_.baro_temperature);
rho_ = 1.225 * pow(data_.baro_pressure / 101325.0, 0.809736894596450);
}
}

Expand Down

0 comments on commit af4b8da

Please sign in to comment.