I've got a BMP180 running on my Raspberry Pi using the Adafruit python modules but the altitude values being reported make no sense. Altitude varies over time and is currently showing our my living rooms as 16 metres below sea level when it is actually 104 metres above! I've seen values between -25 and +22metres.
I also note that both 'pressure' and 'sea level pressure' values vary along with the altitude. How are these values derived? I assume the pressure reading is straight off the sensor, but don't see how both sea level pressure and altitude can both be variables. I would expect either altitude to be a settable constant allowing sea level pressure to be calculated from measured pressure or for sea level pressure to be fixed so that altitude could be calculated.
Strange BMP180 altitude values on Rasp Pi
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Strange BMP180 altitude values on Rasp Pi
You do need to correct for pressure at sea level, which changes continuously.
This thread has more information: http://forums.adafruit.com/viewtopic.php?f=50&t=57380
This thread has more information: http://forums.adafruit.com/viewtopic.php?f=50&t=57380
-
- Posts: 6
- Joined: Tue Jul 08, 2014 7:21 pm
Re: Strange BMP180 altitude values on Rasp Pi
OK, thanks Mike.
So I understand the need to correct the pressure coming off the sensor for altitude to get a correct barometric reading, but what is the purpose of the Altitude and Sea Level Pressure values provided by the python library? As I mentioned above, the altitude readings vary and are completely wrong (see below - readings at 15s intervals). The altitude value is wrong - it should be circa 100m. Yesterday I was getting negative altitude values.
If altitude was correct (i.e. if I could set it to the required value), then presumably I could use the sea level pressure value provided rather than doing the correction myself?
So I understand the need to correct the pressure coming off the sensor for altitude to get a correct barometric reading, but what is the purpose of the Altitude and Sea Level Pressure values provided by the python library? As I mentioned above, the altitude readings vary and are completely wrong (see below - readings at 15s intervals). The altitude value is wrong - it should be circa 100m. Yesterday I was getting negative altitude values.
If altitude was correct (i.e. if I could set it to the required value), then presumably I could use the sea level pressure value provided rather than doing the correction myself?
Code: Select all
Temp = 23.90 *C
Measured Pressure = 101012.00 Pa
Altitude = 25.84 m
Sealevel Pressure = 101018.00 Pa
Temp = 24.00 *C
Measured Pressure = 101011.00 Pa
Altitude = 26.26 m
Sealevel Pressure = 101016.00 Pa
Temp = 24.00 *C
Measured Pressure = 101010.00 Pa
Altitude = 26.34 m
Sealevel Pressure = 101010.00 Pa
Temp = 24.00 *C
Measured Pressure = 101017.00 Pa
Altitude = 25.67 m
Sealevel Pressure = 101017.00 Pa
Temp = 24.00 *C
Measured Pressure = 101017.00 Pa
Altitude = 25.92 m
Sealevel Pressure = 101015.00 Pa
Temp = 24.00 *C
Measured Pressure = 101014.00 Pa
Altitude = 25.42 m
Sealevel Pressure = 101013.00 Pa
Temp = 24.00 *C
Measured Pressure = 101015.00 Pa
Altitude = 25.76 m
Sealevel Pressure = 101017.00 Pa
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Strange BMP180 altitude values on Rasp Pi
Interesting idea.. I wouldn't have thought to calibrate the sea-level pressure from the raw pressure reading at a known altitude.
It should certainly work. You'd just be solving the same equation for another unknown.
I may have to steal that idea. ;-)
It should certainly work. You'd just be solving the same equation for another unknown.
I may have to steal that idea. ;-)
Please be positive and constructive with your questions and comments.