Weather Software > RaspberryPI Weather Software

Calibrate Relative Pressure using a Raspberry Pi computer

<< < (2/4) > >>

gszlag:

--- Quote from: Fatboy on October 29, 2022, 02:12:05 AM ---nOOb, just had to say, this was a great find for one with little time.

--- End quote ---

Once you get your new sensor working, in order to set up the barometer settings in your display console, some initial reading starts here: https://www.wxforum.net/index.php?topic=43477.msg442840#msg442840

watsonm:
I am using the BMP388 sensor that measures Air pressure (since my console is deceased) and find it pretty accurate having done some tests.  I use some Python code to convert the Absolute Pressure given to Relative pressure using the following formula from the referenced web page.

--- Quote ---   pressureR = float(pressure) + ((float(pressure) * 9.80665 * altitude_amsl)/(287 * (273 + temperature + (altitude_amsl/400))))

--- End quote ---

See this site for description:

--- Quote ---https://gist.github.com/cubapp/23dd4e91814a995b8ff06f406679abcf
--- End quote ---

What has suprised me is that quite a few sites have Absolute air pressure greater than Relative pressure. (This is from Ecowitt.net sites)  Ok a few may be below sea level!!   :roll:

gszlag:

--- Quote from: watsonm on October 30, 2022, 05:49:42 AM ---I am using the BMP388 sensor that measures Air pressure (since my console is deceased) and find it pretty accurate having done some tests.  I use some Python code to convert the Absolute Pressure given to Relative pressure using the following formula from the referenced web page.

--- Quote ---   pressureR = float(pressure) + ((float(pressure) * 9.80665 * altitude_amsl)/(287 * (273 + temperature + (altitude_amsl/400))))

--- End quote ---

See this site for description:

--- Quote ---https://gist.github.com/cubapp/23dd4e91814a995b8ff06f406679abcf
--- End quote ---

What has suprised me is that quite a few sites have Absolute air pressure greater than Relative pressure. (This is from Ecowitt.net sites)  Ok a few may be below sea level!!   :roll:

--- End quote ---

Thanks for the link: It looks like a simplified version of some sort of barometric equation. I did not see where or how the author derived this equation.

Have you considered using WeeWX to dynamically calculate SLP and Altimeter?
WeeWX is open source. Code for air pressure can be found on github:
https://github.com/weewx/weewx/blob/master/bin/weewx/uwxutils.py

You could incorporate some of this code into your project or as mentioned, get the BMP388/BMP390 or the new BMP581 to "talk" to WeeWX.

Alas, my coding skils are exactly zero but I do know that WeeWX can incorporate all sorts of external sensors. No how-to for the BMP 388/390 as far as I can find and the BMP581 (just came out earlier this year) is only (so far) available for the Arduino platform.

I have a BMP581 on the way and a Raspberry Pico ( supposedly supports the Arduino IDE) so considering my skillset (limited), this will be interesting.

PS. Sorry..missed you comment about Ecowitt.net ABS and REL values. If ABS > REL (they should be the same out-of-the-box). It could be that an attempt was made to calibrate and perhaps they gave up.

Fatboy:
Thought this would be plug and play w/weewx, save some time. Nope, rabbit hole yet again.

Seems the hardware is GTG.

Pressure: 975.1723  Temperature: 25.36

pi4:~ \$ python /usr/share/weewx/weewx/uwxutils.py
PASSED

Next step, clear as mud...

gszlag:

--- Quote from: Fatboy on November 10, 2022, 04:16:59 AM ---Thought this would be plug and play w/weewx, save some time. Nope, rabbit hole yet again.

Seems the hardware is GTG.

Pressure: 975.1723  Temperature: 25.36

pi4:~ \$ python /usr/share/weewx/weewx/uwxutils.py
PASSED

Next step, clear as mud...

--- End quote ---

WS-2000 check
SDR check
WeeWX check
Belchertown check
BMP388 check

re: Belchertown skin.. you now have realtime Barometer ( actually barometer could be renamed to MSLP ( Mean Sea Level Pressure) or maybe just SLP.

Might as well add the rest of the pressures from WeeWX to Belchertown:
Altimeter and Pressure (station pressure). Like so.

[ You are not allowed to view attachments ]

More work for you. Adding the BMP388 pressure reading directly into WeeWX would be nice.