BMP280 - Pressure value

Hello all
I have a slightly problem with my BMP280 sensor.
When i read out value for pressure from it i got 977hPa and local weather stations network shows pressure between 1013-1015hPa

Is there a way i can calibrate the sensor, i would like to avoid manual correction (to simply sum diffrence and my reading). I doubt that would be relevant all the time

If needed i can post the code

Your BMP280 is giving you the current air pressure at your altitude.

Your local weather station is giving you the "Mean sea level pressure" (MSLP) which has been adjusted to give the value that the current air pressure would be if the measurement had been made at sea level.

The Adafruit library (and most likely the others as well) is set up to deal with this difference. If you specify your actual altitude it can calculate and return the MSLP.

Don

Hi thank you for reply
I am using this two libraries
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>

And this formula gives good results in attachment

That agrees with my code (altitude is in meters):

SeaLevel_Pa = RawData_Pa / pow(1.0 - (ALTITUDE/44330.0), 5.255);

Don

floresta:
That agrees with my code (altitude is in meters):

SeaLevel_Pa = RawData_Pa / pow(1.0 - (ALTITUDE/44330.0), 5.255);

Don

Yes, thank you once again for help
Have a nice day