Hi,
I realize this is more of a barometric pressure conversion question than a microcontroller question, but maybe someone can point me in the right direction? I have the BMP085 connected to my FEZ Panda II.
I am wondering if anyone has experience converting BMP085 pressure readings (or pressure from any sensor in Pascals) to weather station barometric pressure, which commonly reads inHG of mercury at sea level?
I am using the code at: [url]http://code.tinyclr.com/project/235/bmp085---i2c-barometric-pressure-sensor/[/url] and adding the following code, but I am off from 2 - 5 hundreds (from my nearest weather station (within 5 miles) Is this expected? Do I have the conversions right?:
// correct for altitude
StationPressure_In_Pascals = Pressure_In_Pascals / System.Math.Pow((1 - (stationAltitudeInMeters / 44330.75)), 5.255);
// 1inHG = 3386.389 pascals at 0degC (32F)
// 1inHG@ 60F = 3376.85 pascals
// Therefore, we must correct inHG by temperature using linear interpolation
//
// linear interpolation
//double m = (3386.389 - 3376.85) / (32 - 60);
//double b = 3376.85 - (m * 60);
double m = -0.3406785714;
double b = 3397.2907142857;
// [°F] = [°C] × 9/5 + 32
TemperatureF = TemperatureC * 9 / 5 + 32;
double tempCorrectedPascalsToInMg = m * TemperatureF + b;
Pressure_inHG_atSeaLevel = StationPressure_In_Pascals / tempCorrectedPascalsToInMg;
Does anyone know what the temperature correction is from pascals to inches of mercury? Would it matter that I am measuring the pressure in my house currently? My house is warmer than the air outside…