Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Error in Barometer Calibration Unit Conversion

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Error in Barometer Calibration Unit Conversion

Post by Ken22 »

It took me a long time to figure this out but here it is.

My Cumulus is setup to use inHg for pressure. My barometer was just slightly too high according to CWOP predictions (which are in mb), so I put in a negative calibration adjustment (in inHg) under:
Pressure -> Offset (inHg): -> Adds or subtracts a constant value from the raw reading, this shifts the value a constant amount.

It did not correct the error, so I kept on subtracting more and more until CWOP and other sources agreed with my CWOP data. However, my local display was showing a number that was WAY too low.

With a bunch of comparisons and testing, I have concluded that my calibration number in inHg is used properly within Cumulus, but when data is being complied to send to CWOP, my calibration constant is used as it it were millibars which it is not.

I have not tested calibrations for temperature (F) and wind speed (mph), but based on my experience with pressure, these should be checked as well.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by mcrossley »

What station type are you using in Cumulus?

And do you have the option to Calculate Sea level pressure enabled?
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

mcrossley wrote: Thu 14 Nov 2024 6:14 pm What station type are you using in Cumulus?
And do you have the option to Calculate Sea level pressure enabled?
Station Type = HTTP Custom Sender
Hardware = Ecowitt HP2560_C, WS90
Sea Level Pressure: is NOT checked.

Altitude above sea level is 23 feet.
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

I have confirmed that a calibration change of 0.2 inHg in Cumulus causes a 0.2 millibar change at CWOP.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by mcrossley »

OK, consider a can of worms opened! :groan:

First, please post an MXdiags log file, and I'll investigate the inHg -> HPa thing. I cannot see an immediate problem in the code.

Now...

First thing to remember is that Cumulus stores three pressure values (if they are available from the station):

- Pressure - nominally the Sea Level Pressure (SLP)
- Station Pressure - the absolute, or raw pressure sensor value
- Altimeter Pressure - calculated from the Station Pressure using the station altitude

What you normally see in Cumulus interface is the Pressure or SLP.

What is sent to APRS/CWOP is the Altimeter pressure.

Normally the pressure calibration is only applied to the SLP.

If the option "Cumulus calculates sea level pressure" is enabled, then the calculated SLP uses a calibrated version of the Station pressure as the input. The Station pressure value itself is NOT calibrated.

However, when that option is enabled, the HTTP Ecowitt station type was erroneously applying the calibration to the Station pressure and thus to Altimeter pressures as well. I need to fix that to be consistent with all the other stations.

Note: Ecowitt stations do not provide a SLP value, they only provide Station pressure (they call it Absolute pressure) and a Relative pressure. Relative is Absolute + a constant offset.



The big question is: Should the pressure calibration be applied to the Station pressure?

Originally it was designed to correct the SLP value from the station and only applied to SLP.

Or should there be a second set of pressure calibrations that only applies to the Station pressure, and so also affect the Altimeter pressure?

I'm erring towards the latter. In which case the "Cumulus calculates SLP" would also change to using the Station pressure calibration.

I have found another issue with the Altimeter pressure, for stations that do not supply a Station pressure it is simply set to SLP. However, the way it is being done is not easy to maintain and means that mechanism may be applied in some circumstances where the station does support Station pressure. I'll have to refactor this code for the next release.
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

I will have to read over what you have written 4 or 5 times to try to fully comprehend what you are saying. I'll respond when I feel that I fully understand the big picture.

What I can say now is:

1. At 23 feet above sea level, I don't think that altitude is playing any measurable factor in my situation.

2. If my hardware is giving readings for station pressure that are somewhat inaccurate, then the calibration settings need to fix the error in all places where pressure is seen or used (Dashboard, Web Page, and CWOP). Otherwise there is no way to resolve a hardware error.

I'll work on the MXDiags file. I have never dealt with it before.
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

Here is the MXDiags file with a -0.2 inHg pressure calibration.
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by mcrossley »

As far as I can see the calculation is correct, and the value being sent to CWOP is based on the station pressure converted to altimeter.

Taking the 10:57:03 post to CWOP, the pressure being sent is 1008.5 hPa.

At that time (10:56:54) the following values are present:

Station Pressure (abs from Ecowitt) = 29.766 inHg = 1008.0 hPa
Using a station elevation of 23 feet (7.0104 m), gives an Altimeter value of 1008.5 hPa

That matches what is being sent to CWOP, so no calibration is being applied.

If the -0.2 inHg calibration was being applied, then...

Station Pressure = 29.766 - 0.2 = 29.566 inHg = 1001.2 hPa
Using a station elevation of 23 feet (7.0104 m), gives an Altimeter value of 1001.7 hPa

Which isn't what is being sent.
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

I'm somewhat confused.

My goal in all of this was to calibrate my pressure by using the CWOP predicted values which are based on nearby stations which they deem reliable.

The Ecowitt program shows both "Relative" and "Absolute" pressure. It indicates that "Absolute" is what the station measures and "Relative" is Sea Level.
Both the HP2560 and the GW1200 have separate calibration settings for "Absolute" and "Relative". I thought it would be easier to do the calibration in Cumulus. Maybe I was wrong.
The Ecowitt HP2560 display unit lets me display either "Absolute" or "Relative" pressure.
Since I never altered the calibration in either the HP2560 or the GW1200, "Absolute" and "Relative" are showing the same.
So it looks like I should increase my relative value by 0.0249 inHg (0.84 mb) over the absolute value to compensate for the 23 feet of altitude.

Cumulus has an altitude setting which I set to 23 feet.

I did not set "Calculate sea level pressure" in Cumulus. I don't know how this would effect things with CWOP and if I should set it.

CWOP requires that I give them my ground elevation (not the station elevation). I specified 13 feet. I do not know what they do with this information.

Currently my Cumulus Dashboard is showing 29.70 inHg with a zero calibration. CWOP is showing 1006.3 mb.
However, converting 29.70 inHg to mb yields 1,005.76 mb, a difference of 0.54 mb.

Now to address your message:

> - Pressure - nominally the Sea Level Pressure (SLP)
> - Station Pressure - the absolute, or raw pressure sensor value
> - Altimeter Pressure - calculated from the Station Pressure using the station altitude

I don't understand the difference between "Sea Level Pressure" and "Altimeter Pressure". I thought altimeters are set based on Sea Level.

> What you normally see in Cumulus interface is the Pressure or SLP.
> What is sent to APRS/CWOP is the Altimeter pressure.

So this explains the difference in readings between CWOP and Cumulus.

> Normally the pressure calibration is only applied to the SLP.
> The big question is: Should the pressure calibration be applied to the Station pressure?

If the hardware is in error, it seems to me that the calibration needs to effect pressure everywhere.

> Note: Ecowitt stations do not provide a SLP value, they only provide Station pressure
> (they call it Absolute pressure) and a Relative pressure. Relative is Absolute + a constant offset.

Per Ecowitt (HP2560_C Display Manual, Page 56, Note (3) ), Relative Pressure is "corrected to sea-level), yet you are saying Ecowitt does not provide SLP. I'm getting lost here. Isn't SLP calculated from Station Pressure + a constant to account for the altitude, which would be the same as Ecowitt's "Relative" Pressure?

> Or should there be a second set of pressure calibrations that only applies to the Station pressure, and so also affect the Altimeter pressure?
> I'm erring towards the latter. In which case the "Cumulus calculates SLP" would also change to using the Station pressure calibration.

That would certainly solve the hardware error problem, but it does make it difficult to explain to users.

> I have found another issue with the Altimeter pressure

I'm sorry to have caused you so much grief, but as a former software developer, I understand that once you know something is wrong, it is extremely difficult to leave it unresolved.
Ken22
Posts: 97
Joined: Tue 14 Jan 2014 3:08 pm
Weather Station: Ecowitt WS90/HP2560,GW1200,WN32
Operating System: Windows 10 Pro
Location: Massachusetts, USA
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by Ken22 »

mcrossley wrote: Fri 15 Nov 2024 4:34 pm As far as I can see the calculation is correct,
That matches what is being sent to CWOP, so no calibration is being applied.
So what I'm understanding you saying is that no calibrations are used in the CWOP transmission, so nothing I do will fix an incorrect value being sent to CWOP. Is this correct?
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by freddie »

If you apply the correction on the source (the station) then it will propagate into the altimeter pressure.
Freddie
Image
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by mcrossley »

@freddie, any thoughts on the general question of calibration in MX?

I have come to the conclusion that I think it needs two calibration settings. The existing one which is only applied to SLP from the station, plus a new one that is only applied to the the station pressure from the station (and would also apply to a Cumulus calculated SLP and altimeter).
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by freddie »

@mcrossley what you propose sounds sensible.

In an ideal world the calibration offset would be on the station itself.
Freddie
Image
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Error in Barometer Calibration Unit Conversion

Post by mcrossley »

True.
Post Reply