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

Wind rose with trend

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
drjoshua
Posts: 7
Joined: Thu 15 Oct 2009 7:08 pm
Weather Station: free

Wind rose with trend

Post by drjoshua »

I have made a wind rose for average wind bearing http://www.retrodata.com/weather/vadretjustnu-it.asp and it works fine. I used a table background. (Really fun making your own site with the webtags!) It´s going to be implemented on a RC modelplane site.

But I want to present a wind trend, by showing the average wind bearing 1 hour ago and an arrow towards the present wind bearing. http://www.retrodata.com/weather/vindtrend.jpg . I managed to get my hands on the wind bearing data by putting the data into a array and calculated average for the first 10 min.

Issues:
Knowing from which direction the wind bearing comes from (less bearing or more bearing).
Making layers visible depending which wind bearings are involved (working with 360/22.5 numbers of layers and images).
Thinking right when the wind turns from bearing 10 to 270.

Have anyone done this?
TNETWeather

Re: Wind rose with trend

Post by TNETWeather »

Don't recall seeing too many stations using ASP. Not sure if anyone else is using it but it might be of interest to those running IIS to see how you did what you did code wise.

Nice looking graphic.
drjoshua
Posts: 7
Joined: Thu 15 Oct 2009 7:08 pm
Weather Station: free

Re: Wind rose with trend

Post by drjoshua »

My humble code so far is (the most important):

<%
Dim pil
pil="<#wdir>" & ".jpg"
%>


<td width="33%" align="center" valign="middle" STYLE="font-size:13px; background:url(<%=pil%>); background-position: center;background-color:#FFFFFF; background-repeat:no-repeat;background-attachment:scroll">
<font face="Verdana,Arial"><#wspeed></font>
</td>
<td width="34%" align="center" valign="middle" STYLE="font-family:Verdana, Arial; font-size:11px; background:url(tom.jpg); background-position: center;background-color:#FFFFFF; background-repeat:no-repeat;background-attachment:scroll">
<br><img src="solen.jpg"><br>
<#sunrise> <#sunset>
<br>&nbsp;
</td>
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 rose with trend

Post by beteljuice »

If you want the 'trend' to begin at 'old_avg' and end at 'now_avg' you will need MANY more graphics than you have said !

An easier route would be to make your graphics transparent, and 'layer' the 'old' and 'new' on top of each other (16 pics indicator eg. red, 16 pics indicator eg. blue)

Then you need a 'trend' arrow 90 degrees or a bit less, that will cover or fit between the indicators (8 clockwise, 8 anti-clockwise)

You already have your routine for compass 'placement' and know the direction of 'old' and 'new', so now you want to place the 'trend' arrow and know its direction.

(Re-write in the language of your choice - illustrative ONLY !)

if 'old' not equal 'new' AND 'old' speed not equal 0 AND 'new' speed not equal 0 // some change in direction has taken place
trend = old - new - 180 // best guess, take shortest route around compass
if trend > 0
trend_dir = right // clockwise from 'old to 'new'
else
trend_dir = left // anti-clockwise from 'old to new
end

new layer overlay = image = trend_dir [(your position routine) trend / 2]

end

Hope that's understandable to you :?
Image
......................Imagine, what you will KNOW tomorrow !
drjoshua
Posts: 7
Joined: Thu 15 Oct 2009 7:08 pm
Weather Station: free

Re: Wind rose with trend

Post by drjoshua »

Yes, I understand that. I just posted the existing code to show my doings so far.

Lets se what you have written...
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 rose with trend

Post by beteljuice »

I gave you guidance to your 'issues' - I can work with cgi / perl, php, Javascript, anything else you are on your own.

Even then the beteljuice would be unlikely to give you a custom solution to the kind of query you have raised, just hints ;)

This is the Cumulus software support site. Anything else is goodwill and a bonus.
Image
......................Imagine, what you will KNOW tomorrow !
drjoshua
Posts: 7
Joined: Thu 15 Oct 2009 7:08 pm
Weather Station: free

Re: Wind rose with trend

Post by drjoshua »

Now I got it to work! :clap:

http://www.retrodata.com/weather/test.asp

I calculate average for 10 minutes an hour ago and compare it with average last 10 minutes.
I call images representing the rounded values/22.5 degrees.

If bearing(1h) was 45 deg and average(10min) is 180 the code steps from 45/22.5 to 180/22.5 writing images accordingly.

If anyone wants to see the code, just tell me. So long and thanks for a wonderful software.
Post Reply