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

beteljuice AJAX testers wanted

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

Moderator: daj

User avatar
dane
Posts: 417
Joined: Wed 10 Sep 2008 2:15 pm
Weather Station: Rosenborg 68700
Operating System: Win10 Ult., 64-bit, RaspberryPi
Location: Gilleleje, Denmark

Re: beteljuice AJAX testers wanted

Post by dane »

re language: yes: most is at the top - but not all, e.g. ajaxcomfort.
re color: my fault: forgot about class="ajax" resetting the color. After removing that, all is OK.
Ib
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: beteljuice AJAX testers wanted

Post by beteljuice »

Warning !

Just discovered that rain-rate is now ...... err rain-rate

The beteljuice was using this as 'rain last 60 mins', which is no longer the case.

Awaiting further developments (or not as the case maybe)
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
dane
Posts: 417
Joined: Wed 10 Sep 2008 2:15 pm
Weather Station: Rosenborg 68700
Operating System: Win10 Ult., 64-bit, RaspberryPi
Location: Gilleleje, Denmark

Re: beteljuice AJAX testers wanted

Post by dane »

Have been playing with the National Weather Service icons - see bottom of my page: http://www.ibtest.dk/vejr/
Should be displaying day-icons during the day and night icons during the night (using beteljuice's logic for day/night...)

Update: now also has a warning about slippery road conditions if temp between -5 and +2 C.
Ib
goldrush
Posts: 183
Joined: Mon 27 Oct 2008 4:50 pm
Weather Station: Fine Offset WH1081
Location: Aberdeenshire, Scotland
Contact:

Re: beteljuice AJAX testers wanted

Post by goldrush »

This may be a dulicate:-(

Just thought you might like to know, as a first attempt, I have set up an alternative summary page using betel!

<a href="http://www.knaven-weather.co.uk/ajaxbet ... ex.html</a>

I don't understand Java:-( and don't like CSS, but it seems to work ok using html
Thanks
Image
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: beteljuice AJAX testers wanted

Post by beteljuice »

Looks OK :D

Don't forget, this is Work In Progress !

I will be releasing yet another modified version.

It will probably require build 602 as a minimum (That way I can get rid of lots of nasty data existance checks)
Rain last hour will be correct (currently showing rain rate instead)
comfort text will have a language array.
There will be a few new variables to play with, which means
there will be some small mods to the example pages.

Currently testing on my link, need some rain to prove things !
Image
......................Imagine, what you will KNOW tomorrow !
goldrush
Posts: 183
Joined: Mon 27 Oct 2008 4:50 pm
Weather Station: Fine Offset WH1081
Location: Aberdeenshire, Scotland
Contact:

Re: beteljuice AJAX testers wanted

Post by goldrush »

Just noticed one point...
I realise it is only an estimate and probably "first shot"
The snowline estimation using "test1" currently shows minus 58ft but test 2 and 3 show approx same at 938 and 1042 ft which is probaly more realistic
Image
User avatar
aadal
Posts: 168
Joined: Tue 04 Nov 2008 8:07 pm
Weather Station: WH 1080
Location: Skodje
Contact:

Re: beteljuice AJAX testers wanted

Post by aadal »

goldrush wrote:Just noticed one point...
I realise it is only an estimate and probably "first shot"
The snowline estimation using "test1" currently shows minus 58ft but test 2 and 3 show approx same at 938 and 1042 ft which is probaly more realistic
Yes test 1 on Freeze Line and Snow Line can be deleted Test 2 and 3 is close to real.
I live at 40 meters and here start snow:
Temp Now: 1.1°C
test 1 - -301 m / -912 ft * worked out by script
test 2 - 31 m / 95 ft * worked out by script
test 3 - 33 m / 101 ft * worked out by script

:D
  • Windows Vista
Image

Image
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: beteljuice AJAX testers wanted

Post by beteljuice »

That bit is very much experimental !
script wrote: /* the only use I can forsee for these is if you live in a mountainous area and would like to
forecast conditions higher / lower than your situation.
You would be better doing somekind of max. height check (of mountain) against eg.
snowheight_ASL_m
perhaps even do a 'look-up' table for local place names ?
*/
Snow or freezing at your station height is academic - you already know / can measure it !

I've been waiting (and waiting ......) for feedback from people who live in a mountainous area and actually get snow at a different (known) level to their station to see which (if any) are usable.

It should be noted that a marginal change in pressure or temperature can alter predicted heights significantly !!!

Perhaps I should point out that this is a NOW calculation based on current data, plus there has to be the right conditions for snow !

Edit:

Should be 'good' for 15 SM / 25 km radius, possibly greater.
Last edited by beteljuice on Sat 20 Dec 2008 5:14 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
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: beteljuice AJAX testers wanted

Post by beteljuice »

dane wrote:Have been playing with the National Weather Service icons - see bottom of my page: http://www.ibtest.dk/vejr/
Should be displaying day-icons during the day and night icons during the night (using beteljuice's logic for day/night...) ...
Tip: The example pages are pure Javascript

Edited
There is nothing to stop you making it (the .js file) a Cumulus template so that you can use other Cumulus provided data eg. daily events.

Consider the day / night weather pic decision.
If you removed all this:

Code: Select all

curr_month = mname_short;
// define day / night times and background graphics - should really be outside ajax loop
	day_start = "06:30";
	day_end = "18:30";

// OR roughly for Midlands UK and middle month (English) values
	if(curr_month == "Jan") { day_start = "07:30" ; day_end = "17:00"; }
	if(curr_month == "Feb") { day_start = "06:50" ; day_end = "17:50"; }
	if(curr_month == "Mar") { day_start = "05:50" ; day_end = "18:40"; }
	if(curr_month == "Apr") { day_start = "05:40" ; day_end = "20:40"; }
	if(curr_month == "May") { day_start = "04:30" ; day_end = "21:40"; }
	if(curr_month == "Jun") { day_start = "04:00" ; day_end = "22:20"; }
	if(curr_month == "Jul") { day_start = "04:20" ; day_end = "22:10"; }
	if(curr_month == "Aug") { day_start = "05:15" ; day_end = "21:10"; }
	if(curr_month == "Sep") { day_start = "06:10" ; day_end = "20:00"; }
	if(curr_month == "Oct") { day_start = "07:00" ; day_end = "18:45"; }
	if(curr_month == "Nov") { day_start = "07:00" ; day_end = "16:50"; }
	if(curr_month == "Dec") { day_start = "07:30" ; day_end = "16:30"; }
// END English 'rough'
and replaced it with:

Code: Select all

day_start="<#sunrise>";
day_end="<#sunset>";
Then if you update / upload your Cumulus (.js) template just after midnight each day ;)
Last edited by beteljuice on Mon 22 Dec 2008 11:13 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: beteljuice AJAX testers wanted

Post by gwheelo »

Working on an Ajax page right now - can't find "ajax_images/change2.gif" in the download package. Will it be included in the update which I am really looking forward to. Great work - it is likely to make a major change to my site!

GW
Image
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: beteljuice AJAX testers wanted

Post by beteljuice »

Ah, sort of got lost with all the continual tweaks - that was (is still somewhere) a 'blank' graphic the same size as the change arrows + margin, for use in initial html page when you need to 'reserve' the graphic gap for formating, eg. in the middle of a text line.

From the README.txt
** HINT: if you want a 'change' arrow between text, reserve the 'space' in the html page.
eg. <span id="mychangearrow"><img src="PATH/ajax-images/spacer.gif" alt="" width="7" height="8" border="0" style="border: 0; margin: 1px 3px;" /></span>
Where did you find the reference to it ?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: beteljuice AJAX testers wanted

Post by gwheelo »

I found change2.gif in the code starting line 461 in betel_table.html:

Now: <span class="ajax" id = "ajaxtemp_C"></span>&nbsp; / <span class="ajax" id = "ajaxtemp_F"></span>
&nbsp;&nbsp;| Trend:<span id = "ajaxtemptrend"></span> Rate: <span class = "ajax" id = "ajaxtemptrend_value"></span>
&nbsp;&nbsp;|&nbsp;&nbsp;Change: <span id = "ajaxtemparrow_C"><img src="ajax_images/change2.gif" alt="" width="8" height="11" border="0" /></span>

I can't find this "gif" in the download package.

All this is way over my head - but I am having a great time hacking at it. My ajax page in production is: http://www.wheelocknet.net/betel/table1.html . Menus links will be reworked when the page is ready for publication.

GW
Image
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: beteljuice AJAX testers wanted

Post by beteljuice »

Thanks - I'll probably do another 'blank_arrow' the right size, so you you don't have to fiddle with margins etc.

Couple of things about the page you are building ;)

That photograph is WAY too big on memory (1,313,215) :shock:

Here's a resized / crunched thumb (6,625) :D
Image

There is no date / timestamp or 'ajaxindicator' to give visitors a feelgood that something is actually happening.

Condidering I asked for people with some experience to help me debug the script, It has been both frightening and rewarding that so many coding / DHTML newbies have run with it, AND modifying, and producing some great results.

That's what it's for, to do your own thing in your own style.

I must reinforce, this is NOT truly original work, it is basically a mash of of things that have gone before, with input from many people (Including pinto :D ) - yes there are original snippets, and some reworking of logic.

This way we ALL learn - Thank (your personal deity) for open source !!!
Last edited by beteljuice on Mon 22 Dec 2008 3:37 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: beteljuice AJAX testers wanted

Post by gwheelo »

Thanks for the thumbnail - just had not gotten to it yet - needed something for that corner.

As I mentioned - the page is not finished and the next step will be adding all you suggest.

By the way - I am thinking of a way to insert the names of the local winds. I expect it will require a function to return the Catalan wind name. It is not as straight forward as the 16 normal wind points. For instance for the sector 65 to 100 degrees we have "Ventat de Bon Temps" (0 - 5 km/h), "Ventat" de Llevant (16 - 30 kn/h), "Llevant" (31 - 60 km/h), and finally the "Gropada de vent de Llevant" (61+ kp/h). There ar nine distint sectors with one of the sectors broken into thirds at the three lower speed ranges. Ugh!

Any ideas - I am thinking a Function built around "ajax_winddir" and "ajax_wind_kph" - am I on the right track?

Thanks for the your great contribution to this forum

GW
Image
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: beteljuice AJAX testers wanted

Post by beteljuice »

"ajax_winddir" and "ajax_wind_kph" are NOT JavaScript variables per se, they are formatted output to fill an element.

You should use the variables that created them.

I will be making a list of all the 'true' JavaScript variables, that you can do math and / or comparisons with, in the README.txt file.

I seriously recommend that people should put their own stuff in the "EXTRAS and duplicates" section of the script !

The chances are that your kit only reports to 16 points anyway;
However, if you (correctly) use the average windspeed and direction values you should be able to get a pretty good result (maybe :roll: )
... For instance for the sector 65 to 100 degrees we have "Ventat de Bon Temps" (0 - 5 km/h), "Ventat" de Llevant (16 - 30 kn/h), "Llevant" (31 - 60 km/h), and finally the "Gropada de vent de Llevant" (61+ kp/h). There ar nine distint sectors ...
Something along the lines of:

Code: Select all

// ---- Wheelos Catalan wind names ----------------------------------

if(val_org_ave >= 65 && val_org_ave <= 100) { // Sector 1 - Bon Temps
    if(wind_k_ave == 0) { cat_wind = "Cap vent de moment" ;}
    if(wind_k_ave > 0 && wind_k_ave < 6) { cat_wind = "Ventat de Bon Temps" ;}
    if(wind_k_ave >= 6 && wind_k_ave < 16) { cat_wind = "Dont Know" ;}
    if(wind_k_ave >= 16 && wind_k_ave < 31) { cat_wind = "Ventat de Llevant" ;}
    if(wind_k_ave >= 31 && wind_k_ave < 61) { cat_wind = "Llevant" ;}
    if(wind_k_ave >= 61) { cat_wind = "Gropada de vent de Llevant" ;}
} // END sector 1

// repeat for sectors 2 - 9 (eg. val_org_ave > 100 && ............)

Rset_ajax_obs("Catalan_Wind", cat_wind, "");
It can be written several ways, but I deliberately haven't used 'else' so that it is easier for you to build and debug :shock:



In your html you would have the now familar:
<span id = "Catalan_Wind"></span>
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply