Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024

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

Custome Website Wind tags

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
Stephen-wx
Posts: 3
Joined: Mon 19 Jan 2009 1:39 pm

Custome Website Wind tags

Post by Stephen-wx »

Firstly a big hi to Steve and everyone else on here, I stumbled on Cumulus through google searching for an alternative to that rubbish Heavy Weather software shipped with the La Crosse WS-2307, I installed Cumulus and within a couple of hours had it communicating with a developing weather station database called weathercast which in turn communicates with our #weather IRC bot (I'm part of a national organisation of Aussie stormchasers so we are majorly into running our own stations and weather info for everyone to make use of).

Anyhow I also have my own local weather site to run things on, I choose to not run the realtime as the people who look at my site don't need the data quite that fast so 10 minute updates are more than fine and I have my data saved and displayed here at home in real time for my own purposes anyways.

Now every single data feed works fine but is there a tag or script to have it process and generate a wind direction in compass heading words e.g ENE or NE etc that can be used for this site or does anyone know of a script I can load to convert the bearing values to words?

Personally I can translate direction bearings no worries because I'm a stormchaser and used to working with numbers but a lot of my site recipients are just general public so am just finding out if I can make something that is friendlier for them to read.

Well hope everyone has a great day/evening
Stephen :mrgreen:
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Custome Website Wind tags

Post by steve »

The <#wdir> tag produces the averaged wind bearing as a compass point, as on the default index page.

Steve
Stephen-wx
Posts: 3
Joined: Mon 19 Jan 2009 1:39 pm

Re: Custome Website Wind tags

Post by Stephen-wx »

Thanks for that Steve top support on here, that tag wasn't in the custom tags list thats all

Stephen :D
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: Custome Website Wind tags

Post by beteljuice »

Try the following JavaScript to convert bearings:

Code: Select all


function windDir ($winddir) // used for direction graphics
// Take wind direction value, return the
// text label based upon 16 point compass -- function by beeker425
//  see http://www.weather-watch.com/smf/index.php/topic,20097.0.html
{
   $windlabel = new Array("N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW");
   return $windlabel[Math.floor(((parseInt($winddir) + 11) / 22.5) % 16 )];
}	// END function windDir
Then your html you would have something like:

Code: Select all

Wind from <script> windir(<#avgbearing>);</script>
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Custome Website Wind tags

Post by steve »

Stephen-wx wrote: that tag wasn't in the custom tags list thats all
Oops - slapped wrist. I'll fix that... :)

Steve
Stephen-wx
Posts: 3
Joined: Mon 19 Jan 2009 1:39 pm

Re: Custome Website Wind tags

Post by Stephen-wx »

ahh thanks for the conversion script too...

ahh well I figure you made such an awesome proggie that tiny things missing are easy to come across its rock solid, I've been involved with testing a program called Australian Weather Monitor that even though its my friend who makes it the old version had some shocking issues including no stabliity after being run for a couple of days.

theres the prelim site which is a hybrid of the old obs layout as I'm currently working on a new one to accomodate the many more parameters I now have on the new AWS.

http://stephen.bsch.au.com/ofaws

Stephen :D
Post Reply