Page 1 of 1

Ajax Gauge for Cumulus Realtime

Posted: Wed 01 Dec 2010 10:15 pm
by casacota
Here is an AJAX script that reads the file realtime.txt and creates a Gauge, see and download it at:

http://www.casacota.net/teranyina?num=1291240506

(there is also an english version in the package).

I've it done for my site at http://meteo.casacota.net

Since I'm not using Cumulus myself (my homemade weather station is not supported by any software), I'm generating the file realtime.txt by another script of my own, so I'm not sure if there are glitches on my realtime.txt and the gauge could not work with a genuine realtime.txt file, so use and modify it at your own risk!

Re: Ajax Gauge for Cumulus Realtime

Posted: Wed 01 Dec 2010 10:28 pm
by daj
that's a very comprehensive gauge :) Well done

Here it is using my site data...http://www.grantownweather.co.uk/g2/rea ... nglish.htm

I did not modify anything so it is using a genuine realtime.txt file. I think the only thing I would need to change is the wind speed as it is showing in km/hr whereas I measure in m/hr

Re: Ajax Gauge for Cumulus Realtime

Posted: Wed 01 Dec 2010 10:52 pm
by casacota
daj wrote:that's a very comprehensive gauge :) Well done

Here it is using my site data...http://www.grantownweather.co.uk/g2/rea ... nglish.htm

I did not modify anything so it is using a genuine realtime.txt file. I think the only thing I would need to change is the wind speed as it is showing in km/hr whereas I measure in m/hr

Nice, thank you.

The conversions for the wind units are done in the htm file, you may have to change these lines:

Code: Select all

metrespersegon =Math.round(vent * 0.27778);
millesperhora =Math.round(vent * 0.62137);
nusos =Math.round(vent * 0.53961);
maxmetrespersegon =Math.round(maxvent * 0.27778);
maxmillesperhora =Math.round(maxvent * 0.62137);
maxnusos =Math.round(maxvent * 0.53961);
clock.labelvent.setText("wind " + vent + " km/h - " + metrespersegon + " m/s - " + millesperhora + " mph - " + nusos + " kt");
clock.labelmxvent.setText("high gst. " + maxvent + " km/h - " + maxmetrespersegon + " m/s - " + maxmillesperhora + " mph - " + maxnusos + " kt");
As well as these other lines in the english.xml file:

Code: Select all

    <Gauge2Label text="km" font="18" foreColor="navy" x="491" y="55" anchorHorizontal="center" anchorVertical="center"/>
    <Gauge2Label text="/h" font="18" foreColor="navy" x="491" y="70" anchorHorizontal="center" anchorVertical="center"/>
    <Gauge2Label text="km" font="18" foreColor="navy" x="490" y="930" anchorHorizontal="center" anchorVertical="center"/>
    <Gauge2Label text="/h" font="18" foreColor="navy" x="490" y="945" anchorHorizontal="center" anchorVertical="center"/>

Re: Ajax Gauge for Cumulus Realtime

Posted: Thu 02 Dec 2010 8:59 am
by steve
That free Bindows gauges kit looks like it might be very useful.

Re: Ajax Gauge for Cumulus Realtime

Posted: Thu 02 Dec 2010 9:13 pm
by robynfali
Looks very good indeed, one quick question/note

the rain, it goes up to a maximum of 1000mm, so far this year, locally has been over 1000mm, but its not reflected on the guage?

Re: Ajax Gauge for Cumulus Realtime

Posted: Thu 02 Dec 2010 9:21 pm
by robynfali
no matter, it does show in text, cheers, cracking guage ;)

Re: Ajax Gauge for Cumulus Realtime

Posted: Thu 02 Dec 2010 9:24 pm
by casacota
robynfali wrote:Looks very good indeed, one quick question/note

the rain, it goes up to a maximum of 1000mm, so far this year, locally has been over 1000mm, but its not reflected on the guage?
Ah, I've adjusted it for my local values, but you can modify the code to change this.

In the xml file search for this:

Code: Select all

<Gauge2LinearScale font="16" foreColor="navy" startValue="00" endValue="1000" labelCount="11" labelSpacing="35" labelPosition="-20" postString="">
and change the "1000" by another value. Also, you can change the other parameters in these and the two following lines to have a nice design.

This can be done also for all other scales, of course.

Re: Ajax Gauge for Cumulus Realtime

Posted: Thu 02 Dec 2010 9:30 pm
by robynfali
thank you my friend, it looks pretty good

Re: Ajax Gauge for Cumulus Realtime

Posted: Sat 10 Mar 2012 7:35 am
by geoffp
Does anyone have a link to download this gauge :D