Page 3 of 3
Re: Davis #altimeterpressure tag
Posted: Mon 30 Jan 2023 8:27 pm
by TheBridge
Mark/Freddie,
I actually have 2 Davis Consoles. One is 20-yrs old and the other brand new. Both display the same ‘adjusted’ barometric pressure value on the display which is pressure SL. This is apparently the current absolute adjusted for altitude (which I have set identically for both consoles at 750-ft) AND I believe the console’s algorithm may also make very minor tweaks according to current temp and humidity.
Put this aside for the moment. Next…
When I set Cumulus station altitude to O the #press and #altimeterpressure the resulting values are identical. When I then adjust Cumulus to 750-ft. The value of #press is the same however the value of #altimeterpress appears to be the value of #press x altitude adjustment (plus, my guess, very minor tweaks according to current temp and humidity.
So it seems the #altimeterpressure is a Cumulus created webtag value; not one from the Davis console.
P.S. the equation to calculate the adjusted barometric pressure from actual is a bit complex as it is not a straightline result when the effects of ALT, TEMP and HUM are included.
Things make sense now.
Mark - you have Cumulus source so could confirm this.
Re: Davis #altimeterpressure tag
Posted: Wed 01 Feb 2023 4:03 pm
by mcrossley
It is as I said before..
The Davis station code takes the station absolute pressure to calculate the altimeter pressure.
Code: Select all
// Extract station pressure, and use it to calculate altimeter pressure
// Spike removal is in mb/hPa
var pressUser = ConvertPressINHGToUser(loopData.AbsolutePressure);
var pressMB = ConvertUserPressToMB(pressUser);
if ((previousPressStation == 9999) || (Math.Abs(pressMB - previousPressStation) < cumulus.Spike.PressDiff))
{
previousPressStation = pressMB;
StationPressure = ConvertPressINHGToUser(loopData.AbsolutePressure);
AltimeterPressure = ConvertPressMBToUser(StationToAltimeter(ConvertUserPressureToHPa(StationPressure), AltitudeM(cumulus. Altitude)));
}
The only other place the altimeter pressure is manipulated is in the main code that processes the sea level pressure. Which if the station is a Davis and loop2 is not enabled set altimeter=slp...
Code: Select all
if (cumulus.Manufacturer == cumulus.DAVIS)
{
if (!cumulus.DavisOptions.UseLoop2)
{
// Loop2 data not available, just use sea level (for now, anyway)
AltimeterPressure = Pressure;
}
}
Re: Davis #altimeterpressure tag
Posted: Wed 01 Feb 2023 11:21 pm
by TheBridge
Mark,
To your first statement “The Davis station code takes the station absolute pressure to calculate the altimeter pressure.” is meant that Cumulus takes the Davis station absolute pressure and calculates the altimeter pressure? If so this would understandably be to simplify the support for all brands of weather stations, and their disparate API formats for SL BAR, but who at the least provide absolute pressure data and from there Cumulus can calc out the #altimeterpressure value with its own internal conversion formula.
I agree with second statement. Seeing the line of code line…
AltimeterPressure = Pressure;
…that if a Davis station user has Loop2 turned off in Cumulus the ‘press’ and ‘altimeterpressure’ tags return the same [absolute] current pressure value. I tried this and this is true.
Reference material for Davis BAR commands from Davis API manual:
"BAR=<bar value to display (in Hg * 1000)-decimal> <elevation (ft)-decimal>"
It sets the elevation and barometer offset values when setting the barometer for a new location.
<bar value to display (in Hg * 1000)-decimal> If you have a current barometer reading from a very reliable nearby reference, you can use this parameter to force the display to an exact setting. The console uses this value to fine-tune its own adjusted barometric pressure calculations. Do not use this setting alone to correct your barometer to sea-level.
Use a value of zero when you do not have an exact barometer value that you want the Vantage console to display. This also clears out any existing offset value previously set.
This value should either be zero or between 20.000” Hg and 32500” Hg.
< elevation (ft)-decimal>
This is the primary means to correct the barometer measurement. Negative values for elevation can be used.
This value should be between -2000 ft and 15000 ft.
If accepted, the console will respond with an "OK", otherwise it will respond with a Not Acknowledged (0x21 = "!") character.
Example (No local Barometer value, elevation 132 ft): >"BAR=0 132"<LF>
<<LF><CR>"OK"<LF><CR>
Example (Barometer value = 29.491 in Hg, elevation 0 ft): >"BAR=29491 0"<LF>
<<LF><CR>"OK"<LF><CR>
Example (Barometer value = 29.991 in Hg, elevation -75 ft):
>"BAR=29991 -75"<LF>
<<LF><CR>"OK"<LF><CR>
"BARDATA" It retrieves the current barometer calibration parameters in text. These tell you what the current elevation setting and barometer offset values are, plus some details on the barometer correction factor being used.
Example:
>"BARDATA"<LF>
<<LF><CR>"OK"<LF><CR>
<"BAR 29775"<LF><CR>
<"ELEVATION 27"<LF><CR>
<"DEW POINT 56"<LF><CR>
<"VIRTUAL TEMP 63"<LF><CR>
<"C 29"<LF><CR>
<"R 1001"<LF><CR>
<"BARCAL 0"<LF><CR>
<"GAIN 1533"<LF><CR>
<"OFFSET 18110"<LF><CR>
Name Value in example Explanation:
BAR 29.775 in Hg The most recent barometer measurement.
ELEVATION 27 ft Elevation in feet
DEW POINT 56 °F Dew point when the barometer measurement was taken
VIRTUAL TEMP 63 °F Temperature used in correction formula (12 hour average)
C 29 Humidity correction factor used in the formula
GAIN and OFFSET These are the factory set values to calibrate the barometer sensor on this console.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 11:44 am
by mcrossley
We seem to be going round in circles.
I have confirmed that the CMX code is correct, and for me and other users it gives the correct values.
I just verified again with my old VP2 station. From the station with my elevation set to 250 ft, I get at the moment...
Code: Select all
Station (absolute) = 29.981 = 1015.27
SLP = 30.234 = 1023.84
Altimeter (CMX calc) = 1023.42
Web tags...
{"press":"1023.8","altimeterpressure":"1023.4","stationpressure":"1015.3"}
I added a new web tag for the station/absolute pressure

Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 2:04 pm
by TheBridge
Yes, We’re done with this. Thank you for your patience!
Last question though, any way we could have ‘altimeterpressure tag return 4 digits (xx.xx) instead of current 3 digits (xx.x)?
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 2:21 pm
by water01
Station Settings > General Settings > Advanced Options > Pressure Decimals change default 1 to 2.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 2:39 pm
by freddie
Related to this: I get the following for the 3 tags mentioned above:
Code: Select all
{"press":"1025.23","altimeterpressure":"1024.2","stationpressure":""}
i.e. no value for stationpressure.
I have a VP2 and use LOOP2.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 3:00 pm
by mcrossley
The tag is added to my current dev code, so not released yet

Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 3:28 pm
by freddie
mcrossley wrote: ↑Thu 02 Feb 2023 3:00 pm
The tag is added to my current dev code, so not released yet
Ah cool, fair enough

Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 4:29 pm
by TheBridge
Already set at 2 decimals.
‘press’ gives 2 decimals.
‘altimeterpressure’ only 1.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 5:00 pm
by mcrossley
Found and fixed, it was using the temperature decimal places!
When using the web tag in files you can always override the number of decimals with the "dp=n" option.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 5:55 pm
by TheBridge
The dp=n option is entered on say IndexT or realtimegaugesT? Not sure of command format with altimeterpressure tag.
Re: Davis #altimeterpressure tag
Posted: Thu 02 Feb 2023 10:09 pm
by TheBridge
Scratch previous request.
Figured out file and # format OK. Now have dp=2 implemented