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

Yet more gauges

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

Moderator: daj

Post Reply
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Hi Ray, can you update to the contents of the latest zip file please, the version you have was faulty.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yet more gauges

Post by gemini06720 »

Mark, I 'hacked' for a few hours at the previous release (v0-1) ... unfortunately without success... :evil:

I have downloaded the latest release (v0-3) and will try it in a little while.

In order to be able to display unusual characters (such as the degree symbol) I had to change the charset to "ISO-8859-1" - I do not think "UTF-8" will be able to display accentuated characters (not tried yet).

May I suggest that the UoM (units of measure - ie: temperature, rain, pressure, wind speed) be read from the data ('realtimegauges.txt') file rather than being 'hard-coded' into the script... ;) ;)

Thank you for being so open to suggestions... :twisted:
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Ray,

UTF8 should be fine for accented characters and definitely for the degree symbol.

Not sure what you mean by the UoM being hard coded? I do read them from the realtime file, but I have to compare them against hard coded values in order to make decisions about scales etc.

I am aware that the scale ranges will probably need a little tweaking/extending for some people.
RayProudfoot
Posts: 3602
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Yet more gauges

Post by RayProudfoot »

mcrossley wrote:Hi Ray, can you update to the contents of the latest zip file please, the version you have was faulty.
Now updated to 0.3 but sadly the same problems exist. I think we only differ in how we measure rainfall so this is perplexing. Hope you can sort it because these gauges are brilliant.

LATER: Tried it with IE8 but got a message that canvases aren't supported. For the record I'm running Firefox 5. But I can see your gauges fine Mark so it seems something is wrng with my config and/or paths.
Cheers,
Ray, Cheshire.

Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Ray

I think it is because you still have an old copy of the realtimegaugesT.txt that Cumulus is processing.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yet more gauges

Post by gemini06720 »

OK, Mark, I have installed the latest release (v0-3).

Looking at the 'gauges.js' script I notice a little coding error. ;)

I like that you have now created a variable 'imgPathURL' for the 'relative' path to the folder containing the graphics produced by Cumulus, but I do not think (my personal opinion) that including that path into the array 'g_tipImgs' is a good thing - I would suggest that the variable 'imgPathURL' be placed into the script wherever the array 'g_tipImgs' is used, such as (line 669):

Code: Select all

document.getElementById('imgtip0_img').src = imgPathURL + g_tipImgs[0][0] + g_cacheDefeat;
The 'ddimgtooltip.js' script also needs to be modified so that the variable 'imgPathURL' can be used for the hover tool tip images:

Code: Select all

tooltips[0]=[imgPathURL + "temp.png", " ", {background:"#FFFFFF", color:"black", border:"2px ridge darkblue"}];
Mark, with your scripts, indeed, using the charset to "UTF-8" does display the degree symbol.

I have also downloaded the demonstration page from Gerrit Grunwald website and installed it on my computer trying to understand why your scripts would not work. For that page, if I use the charset "UTF-8", the degree symbol does not display (or rather it is displayed as a question mark within a black diamond) - thus my need to use the charset "ISO-8859-1".
mcrossley wrote:Not sure what you mean by the UoM being hard coded? I do read them from the realtime file, but I have to compare them against hard coded values in order to make decisions about scales etc.
Somewhere down the code:

Code: Select all

  //set some default units
  cumulus.tempunit = "°C";
  cumulus.rainunit = "mm";
  cumulus.pressunit = "hPa";
  cumulus.windunit = "mph";
On my system, the wind speed unit is in kilometer/hour - thus, if mph is used, the resulting display will be wrong...

Oh, from which file do you read the UoM, from the 'realtime.txt' file or from the 'realtimegauges.txt' file - on my system the two files are at different locations? :?

And, as indicated by the 'other' Ray :mrgreen: , the script will not 'initialize' - it just get 'stuck' as 'Downloading' (same problem with the previous release). I have tried different options, all unsuccessful... :(

The script must be reading some data from the 'realtimegauges.txt' file - clicking on the buttons get the gauges going, but no updating! :evil:

Script is [link removed] - on my home/office Apache server running under Windows 7 Pro.
Last edited by gemini06720 on Thu 30 May 2013 7:06 am, edited 1 time in total.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Right, firstly apologies again, the realtimegaugesT.txt in the zip is out of date. The correct one is attached. This is the cause of Ray and Ray's problems.

Ray (gemini) Ah I see your concern, those values are just placeholders to stop the initial drawing of the gauges failing whilst the data is fetched from the web site. Once the script has your realtimegauges.txt file, it will update the default values with your specific values.
Last edited by mcrossley on Wed 29 Jun 2011 2:06 pm, edited 1 time in total.
RayProudfoot
Posts: 3602
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Yet more gauges

Post by RayProudfoot »

Bingo!!!

It works. I decided to compare my realtimegauges.txt to yours Mark and noticed your first field was the time but mine was the temp. You probably spotted it at the same time. ;)

My only suggestion is that the forecast window could do with being a bit wider so "Precipitation possible within 24 to 48 hours" is fully visible.

It looks accurate enough to throw open to the wide world. I'll modify my home page later today.

Well done that man!! :clap:
Cheers,
Ray, Cheshire.

Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yet more gauges

Post by gemini06720 »

Mark, I have replaced the 'realtimegauges.txt' file...

And it is now a 'go'! :D

And as the 'other' Ray (the 'Proudfoot' one :) ) pointed out, the forecast window could be somewhat wider... ;) How difficult would it be to make the forecast window 'flexible', meaning that it automatically adjust its width according to the length of the forecast string... :mrgreen:
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Ray

Good job, you can try upping the size of the text display by altering line 407 of gauges.js, change:

width: 350,

to something like:

width: 400,

However, I would not say they were ready for the real world yet. They only work on the latest browsers, so we should really put a redirect in there for non-compatible browsers back to the original gauges page. The code isn't very robust and isn't very well proven. I'd hold off for a bit, but it's your call.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

Ray (gemini), you seem to have a problem with the popup trend images, they are out of sync for some reason?
RayProudfoot
Posts: 3602
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Yet more gauges

Post by RayProudfoot »

Hi Mark! (thank God there isn't two Marks or this would really be fun!), :lol:

It required a width of 900 before the whole message was visible. The other Ray's suggestion of a variable-sized box depending on message length sounds good but I don't have to program it! ;)

Good point about it not working with all browsers. I'll hold off for now. Do you have a list of those it does work with?
Cheers,
Ray, Cheshire.

Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Yet more gauges

Post by steve »

I've got them installed here - http://sanday.org.uk/weather/gauges-ss/gauges-ss.htm

Excellent work!

What do the red sectors on the barometer represent?
Steve
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

I've talked to Gerrit about making text that is too large scroll, that should be fun! Any 'latest' browser should work, IE9, Chrome, FF4+ etc.
I'm at the barbers now, catch you later.

the red sectors are your all time low/high limits
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet more gauges

Post by mcrossley »

steve wrote:What do the red sectors on the barometer represent?
I see a problem with the code and your values. Your all time high pressure is 1044.9, and the code sets the scale max to 1050, but the clever gauge code decides that a 'nicer' value would be 1060. I then draw the upper red sector from 1044.9 to 1050, which now doesn't reach the end of the scale :(

The 'nice' values in the gauges can be switched off to force them to use your supplied values - I'll try that.
Post Reply