Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

Wind speeds

Talk about anything that doesn't fit elsewhere - PLEASE don't put Cumulus queries in here!
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Wind speeds

Post by beteljuice »

@sfws ..
Too simplistic ...

Code: Select all

$latest	= max( <#wlatest>,<#wgust>);
<#wgust> will persist for 10 min.


@Ralph1

Are you really trying to maintain a database of 1sec entries ?
That's 31,557,600 x number of data fields per year !!!!!
Image
......................Imagine, what you will KNOW tomorrow !
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Wind speeds

Post by sfws »

beteljuice wrote: Sat 07 Mar 2020 9:50 pm @sfws ..
Too simplistic ...

Code: Select all

$latest	= max( <#wlatest>,<#wgust>);
<#wgust> will persist for 10 min.
I already said it was not a solution to solving his problem, it was a hint along the way. As I also said, I would need to understand what he is trying to do, to go any further.
Ralph1
Posts: 20
Joined: Sun 07 Apr 2019 6:47 pm
Weather Station: Instromet
Operating System: Ubuntu Linux

Re: Wind speeds

Post by Ralph1 »

I use the CumulusMx Extra Web files to create a file called myrealtime.txt which contains my meteorological parameters including #wlatest for instantaneous wind speed and #wspeed for average wind speed. I have looked at #wgust but it remains at the last gust speed for I think the previous 10 minutes. My object as stated previously is to make sure that the maximum gust speeds are present in #wlatest which means some sort of logic to make sure that if #wgust goes higher than #wlatest then it sets #wlatest to #wgust for one sample and not for any more until the next time #wgust exceeds its previous value. My software which gathers the data from the above file uses Visual Basic and keeps up easily with the rate at which data is being sent. So that is where I can create the logic to make sure that the above happens but it is a slightly tricky problem to make it work.
The data actually goes into Weather Display in Client Mode which displays quite clearly when a gust occurs and nearly always using #wlatest by itself, such a gust is less than the #wgust signal for reasons I don't understand. After being in WD the data gets written out to my database which is somewhere in the south of England.

I hope this explains what I am trying to do and it is frustrating that the gust speed is missing from the values of #wlatest as often as it is. Before I tried to use Metplus, I had the old Metlog data logger and that only had two wind speed signals, they were the equivalent of #wspeed and #wlatest and all gusts of wind speeds appeared in #wlatest. These signals in that case appeared at 0.5 second intervals and it worked really well until the Metlog unit finally gave up the ghost.

John
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Wind speeds

Post by sfws »

Visual Basic eh, yes during the middle of my working life, I could do a lot with that.
I even have a fat book called "Visual Basic 2005 step by step", although I'm not sure if I will ever read it again. I suspect I brought that when I stopped using VB at work in case I did ever need to use VB again. I'm too rusty, too old to re-learn VB ... so I won't try to write the exact code for you.

But I think you could take a copy of #wgust, and compare against that to spot when #wgust changes (I said before you can make that every minute instead of every 10).
Alternatively, visual basic has a timer function, from the little I can recall I used that in the past to code something to change every minute or some other interval, so for you that could kick off the code to compare with #wgust again.

You can compare #wlatest with #wgust just once, and then use #wlatest as you say while you wait for the other comparison/timer to signal a need to compare again.
This probably requires just one or perhaps two "if ... then ... elseIf ... else .. endif" type constructions.
User avatar
mcrossley
Posts: 12692
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Wind speeds

Post by mcrossley »

Which is what Cumulus does for some other stations - use the live current feed, then once a minute check the gust value, if it has increased since the last time we checked and greater than current, set current to gust, and stash the old gust value.
Ralph1
Posts: 20
Joined: Sun 07 Apr 2019 6:47 pm
Weather Station: Instromet
Operating System: Ubuntu Linux

Re: Wind speeds

Post by Ralph1 »

I am sorry that I have not contributed to this topic for some time. Basically the problem is that wind gust speeds in CumulusMX output often don't appear in the signal "#latest". As I use Weather Display which only has two inputs for wind, i.e instantaneous wind and average I had to find a way round this. I do not understand why the gust signals often fail to appear in #wlatest, there must be a design flaw there somewhere. The old Instromet Metlog datalogger system didn't have any problem of this sort, it just outputted the instantaneous speed and the average speed, with the gust speed included in the instantaneous speed and these could be fed directly into WD.

The way I have solved it is as follows:
First of all I now input 3 wind speed numbers from CumulusMX. These are #wspeed, #wlatest and #wgust. I have also created a variable called oldgust.
Now I actually use VB to do the calculations, the first thing I do is to check if #wgust has changed from it's previous value oldgust. If it has not then #latest is used as the correct instantaneous speed. If it has changed, that means that there is a new value of gust speed #wgust created and the next thing is to check if #latest is less than #wgust. If it is then #wgust is used as the new value for #wlatest. ( I don't use the actual quantities as below but defined VB quantities. I have used the values shown here to help indicate what's going on.
In software this is as follows: if (#wgust <> #oldgust) then
oldgust = #wgust
if (#wlatest < #wgust) then
#wlatest = #wgust
Endif
Endif
I hope these equations turn out as I see them here. The first line checks that the two quantities are not equal. If they are equal then nothing happens. If they are not equal, the next if statement attempts to find if #wgust is greater than the current #wlatest. If it is then #wgust gets substituted for #wlatest this one time. Next time around, with the next set of readings, because #wgust won't have changed, then the if statements do nothing and will only do something the next time #wgust changes - which is likely to happen in up to 10 minutes later depending on the speed of the wind.

Ralph1
Post Reply