Update pressure calculation to use equations from BMP datasheet instead of wikipedia.

This commit is contained in:
Tony DiCola
2014-09-19 13:57:19 -07:00
parent cf6e244865
commit 67ae2e69a6
3 changed files with 74 additions and 27 deletions
+2 -3
View File
@@ -115,13 +115,12 @@ void loop(void)
Serial.print(temperature);
Serial.println(" C");
/* Then convert the atmospheric pressure, SLP and temp to altitude */
/* Then convert the atmospheric pressure, and SLP to altitude */
/* Update this next line with the current SLP for better results */
float seaLevelPressure = SENSORS_PRESSURE_SEALEVELHPA;
Serial.print("Altitude: ");
Serial.print(bmp.pressureToAltitude(seaLevelPressure,
event.pressure,
temperature));
event.pressure));
Serial.println(" m");
Serial.println("");
}