raspberry-pi-bme280 icon indicating copy to clipboard operation
raspberry-pi-bme280 copied to clipboard

Negative Altitude

Open janvda opened this issue 9 years ago • 1 comments

Hi,

Well done. It is working for me. The only very little thing is that I get a negative altitude.

pi@raspberrypi:~ $ ./raspberry-pi-bme280/bme280 {"sensor":"bme280", "humidity":52.73, "pressure":1027.16, "temperature":21.39, "altitude":-117.22, "timestamp":1481299767}

FYI I also compared your output with another python script and it was pretty much the same as you can see below:

pi@raspberrypi:~ $ python bme280.py Chip ID : 96 Version : 0 Temperature : 21.41 C Pressure : 1027.17530826 hPa Humidity : 52.5197467655 %

kr Jan

janvda avatar Dec 09 '16 16:12 janvda

Hi Jan, thanks for the info. As you probably know, altitude is calculated from pressure. The reference point is hard coded 1013hPa, which is mean sea level pressure. The altitude that you get as output is relative to 1013hkPa, so it cal be negative. This is not very reliable way to measure altitude, but it gives you a rough estimation of the altitude.

andreiva avatar Jan 21 '17 14:01 andreiva