diff --git a/src/SparkFunBME280.cpp b/src/SparkFunBME280.cpp index b1136c3..e1cc7d5 100644 --- a/src/SparkFunBME280.cpp +++ b/src/SparkFunBME280.cpp @@ -475,6 +475,11 @@ float BME280::readFloatAltitudeMeters( void ) // see NRLMSISE-00. That's why it is the "international" formula, not "interplanetary". // Sparkfun is not liable for incorrect altitude calculations from this // code on those planets. Interplanetary selfies are welcome, however. + + // firstly read temperature for avoiding wrong calculation + readFloatPressure(); + readTempC(); + heightOutput = ((float)-44330.77)*(pow(((float)readFloatPressure()/(float)_referencePressure), 0.190263) - (float)1); //Corrected, see issue 30 return heightOutput; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy