Using the Python library from Pimoroni, the return value from
weather.presssure()
is a value like 84907.18
This is supposed to be in hPa (hectoPascals), but is two orders of magnitude too big to be an hPa value on Earth. I double-checked that I wasn’t somewhere deep in Jupiter’s atmosphere and found I wasn’t, so I dug into the Pimoroni Python ‘envirophat’ library which led me into the bmp280.py library, where I see a bunch of calculations commented as
formula for pressure from datasheet.
…Except the actual data sheet fairly clearly indicates that the calculated values are in Pascals (Pa) not hPa, so that explains the order of magnitude problem – weather.pressure() is returning a value in Pa, not hPa.
Going further, though, after converting to inHg, the standard unit of measure for barometric pressure in the US, I’m getting values of roughly 25.xx inches – which is quite a bit lower than my weather station’s value (and lower than close-by values from Weather Underground for my location) by about 5 inches (or about 170 hPa). This is far outside the advertised absolute accuracy of +/- 1 hPa.
Curiously, the weather.altitude() function returns 1522m, which is within 2m of the GPS altitude for my location.
Is anybody else using this sensor running into the same issues?
-M.