BMP280 Sensor problem

Hi there!
I´m using the BMP280 barometric sensor (shield), and I´m having some Reading problems.
He is connected to Arduino UNO by I2C protocol, and the barometric reading that I have is very diferent from the área that I live.

I live very near to the Curitiba Int´l Airport (SBCT - CWB) and I use the control tower altimeter setting to compare both readings.
With some math I can "hit" the right altimeter reading, but if I change the city, that math doesn´t help anymore.

Does anyone could help me?
Thank you!

Patrick
8)

Post your code and the data you're getting and how it differs from the sensor at the airport.

Do you plan to use the sensor reading for weather analysis or to get an altitude?

I´m using the I2C-Sensor-Lib iLib found on IDE libary tool.

I´m dividing the “pascal” variable for 100 (at Serial.print command), because the sensor give the barometric pressure in Pa, and i wanto to read in hPa (hectopascal), and this is the right way to convert.

Now, for exaple I´m reading 948hPa, and the altimeter here is 1014hPa. Please note that I´m not in Curitiba now, but I also have the local airport altimeter setting to compare here.

This is the code:

#include <Wire.h>
#include “i2c.h”

#include “i2c_BMP280.h”
BMP280 bmp280;

void setup()

{
Serial.begin(9600);

Serial.print("Probe BMP280: ");
if (bmp280.initialize()) Serial.println(“Sensor found”);
else
{
Serial.println(“Sensor missing”);
while (1) {}
}

// onetime-measure:
bmp280.setEnabled(0);
bmp280.triggerMeasurement();
}

void loop()

{
bmp280.awaitMeasurement();

float temperature;
bmp280.getTemperature(temperature);

float pascal;
bmp280.getPressure(pascal);

static float meters, metersold;
bmp280.getAltitude(meters);
metersold = (metersold * 10 + meters)/11;

bmp280.triggerMeasurement();

Serial.print(" HeightPT1: “);
Serial.print(metersold);
Serial.print(” m; Height: “);
Serial.print(meters);
Serial.print(” Pressure: “);
Serial.print((pascal)/100);
Serial.print(” hPa; T: “);
Serial.print(temperature);
Serial.println(” C");
delay(2000);
}

I live very near to the Curitiba Int´l Airport (SBCT - CWB) and I use the control tower altimeter setting to compare both readings.

Airports report the equivalent sea level pressure, not the local air pressure. This is because many pilots use altimeters based on barometric pressure. Since you are around 900 m elevation, there is a substantial difference between the two.

The accepted standard relationship between pressure and altitude is described here among many other places, and to use it to determine altitude from pressure, you need to know the sea level pressure.

jremington:
Airports report the equivalent sea level pressure, not the local air pressure. This is because many pilots use altimeters based on barometric pressure. Since you are around 900 m elevation, there is a substantial difference between the two.

The accepted standard relationship between pressure and altitude is described here among many other places, and to use it to determine altitude from pressure, you need to know the sea level pressure.

Ok, you are right... I´ll convert the data to my local alavation.

I´ll post the result.

Thank you!

pylon:
Do you plan to use the sensor reading for weather analysis or to get an altitude?

I´m building an amateur weather station to myself.
I´m just an arduino hobbyst.

greetings