Barotrend

Davis Vantage Pro2, Pro1 (not firmware A)

Moderator: Mattk

Post Reply
bvatter
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Sep 12, 2008 5:23 pm

Barotrend

Post by bvatter »

For a lot of application you need a barometer-trend;
usually last 3 hours ( because of significant
change ). I couldn't find those data in Meteohub.
Somebody knows how to solve that problem ?
sevenless
Gold Boarder
Gold Boarder
Posts: 160
Joined: Wed Jul 02, 2008 7:35 pm
Location: Seattle WA, USA

Re:Barotrend

Post by sevenless »

If you know a little PHP you can extract it from the all_sensors.txt data file -- there's a variable called seqhour1_thb0_sealevel_hpa that contains a snapshot of the barometric pressure every hour for the past 26 hours, separated by the underscore (_) character. The first measure is nearly-current data (within a few minutes, and thus nearly identical to actual_thb0_sealevel_hpa), so the fourth measure is three hours ago.

Parse those two out of the string, subtract them from one another, and you can determine three-hour trend.

As discussed in other posts on the forum, the VP2 interprets three-hour trends like this:
"Rising rapidly" is a net change of 2.0 hPa or greater.
"Rising slowly" is a change of between 0.7 to 2.0 hPa
"Steady" is a change of between -0.7 to 0.7 hPa.
"Falling slowly" is a change of -0.7 to -2.0 hPa.
"Falling rapidly" is a change of greater than -2.0 hPa.

I can provide some basic code if this is something you want to try implementing on your own website.

There are also two recently-added variables called last60m_thb0_press_trend and last24h_thb0_press_trend which return a '1' for rising, '0' for steady, and '-1' for falling, but they only cover either the past hour or past day, and still require some basic parsing to turn into a text string on a webpage. (There's also a hour1_thb0_press_trend, but it's less useful since the time-period it covers changes since it resets at the top of each hour.)
bvatter
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Sep 12, 2008 5:23 pm

Re:Barotrend

Post by bvatter »

In my all_sensors.txt i cannot find a variable
seqhourX_...
And also the variables ..._press_trend don't exist.
My Meteohub - Version is 2.6.
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:Barotrend

Post by skyewright »

bvatter wrote:My Meteohub - Version is 2.6.
Which sub version?
IIRC the trends were only added in v2.6f (and may possibly have had additional tweaks since then, too).
bvatter
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Sep 12, 2008 5:23 pm

Re:Barotrend

Post by bvatter »

I now installed v2.8b. In the all_sensors there are no seqhour_ items. How to 3-hours-Barotrend.
bvatter
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Sep 12, 2008 5:23 pm

Re:Barotrend

Post by bvatter »

bvatter wrote:I now installed v2.8b. In the all_sensors there are no seqhour_ items. How to 3-hours-Barotrend.
Written to soon; found the seqhours !!
Post Reply