Author Topic: Steel Gauges  (Read 221498 times)

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Steel Gauges
« on: December 29, 2012, 06:40:08 AM »
Hi all,
I am currently working on a template set for the Steel Gauges  but there are a few things that I am unable to get working without major modification to the files.
I don't really want to go down that path as it would effectively create a new branch of the files you download from http://wiki.sandaysoft.com/a/SteelSeries_Gauges. Instead I would like to get the changes I make "incorporated" into Marks.

To do this would mean that some additional tags would need to be exposed by WC as follows:

Latitude
Longitude
Elevation
Apparent Temp
Humidex
Bearing of the maximum wind gust during a given time frame
Dominant Wind Direction
Total wind run for each of the 8 compass points for a given time frame

Could one of the WC devs please let me know which of the above would be easy for you to implement?

I have got most things working now and you can see it (with all it's bugs) at http://weather.kcsolutions.com.au/gauges-ssT.html

At some point I would like to get a volunteer who doesn't use metric to give it a go on their website and also someone who uses a station with more accuracy than what I can get from my WMR200.

Col.

Randall75

  • Storm
  • *****
  • Posts: 1332
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 OS High Sierra 10.13.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: Steel Gauges
« Reply #1 on: December 29, 2012, 12:31:25 PM »
Hi Uncle Buck
 So far they are looking really good thanks for working on them
 [cheers1]

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Steel Gauges
« Reply #2 on: December 29, 2012, 07:57:06 PM »
Hi Col,
How are you driving them? Is it Custom CGI, periodic file processing or a combination of both?

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #3 on: December 29, 2012, 10:11:22 PM »
The gauges are all done in Javascript.
They are driven by periodic file processing which at the moment I have set to every 30 seconds.
The gauges script is processing the JSON formatted file called realtimegaugesWC.txt.
The JSON file is being processed by WC and uploaded as part of the Custom Web > Additional Files every 0.2 minutes.
There is also a HTML file that is being processed by WC and uploaded as part of the Custom Web but this is only done every two minutes.

I hope all that made sense as I am by no means a programmer.

Col.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Steel Gauges
« Reply #4 on: December 29, 2012, 11:44:14 PM »
OK, thanks Col.

The plan here would be to do all necessary tag additions as a 'oner' during the 1.2 development rather than in dribs and drabs.
 
Give me a day or two to plan the work out then I'll get back to you with suggestions and any further questions.

Quick question for now - by dominant wind direction, do you mean average wind direction?

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #5 on: December 29, 2012, 11:54:28 PM »
I am at a bit of a loss on the Dominant Wind Direction thing as what "I" believe that would be is the direction from which most of the wind came from.

An average direction would be a completely different result as an example.....

If the wind came from the West and South today and it spent most of the day coming from the South, then the dominant wind direction would be South. The average direction in this case would be somewhere around South-West.

I also forgot that the SS Gauges use UTC to determine if the site (data feed) is down, so could you please include that one in the list as well?

I have sent a message to the author of the script to see if my changes can be integrated into his scripts but we will have to wait and see on that front.

Col.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Steel Gauges
« Reply #6 on: December 30, 2012, 12:38:09 PM »
Thanks Col, so with regards dominant wind direction, probably the longest wind run vector over the last 24 hours (WeatherCat has a vector for each degree). So this tag would be replaced with a numerical value 0 to 359. Is it 24 hours or today or some other time period?

Cheers,
Stu.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #7 on: December 30, 2012, 12:49:02 PM »
Stu,
I am not sure that is correct either.... If you have a period of 60 minutes where the wind speed is say 40 km/h from the North but the rest of the day it was 2 km/h varying from  NW to NE, does that make the dominant direction North? It's a hard call and I am not sure what the real answer is. I will post a message on the Cumulus forum so see what they believe is the right answer.

As we use 0900hrs as the start of the day here in Aus, then that is what I would use, but others may have a different opinion on that.

BTW, the request for UTC.... The format they expect in the file is yyyy,m,d,h,m,s

The script author has got back to me and asked what changes I have made etc. to which I have replied but as yet have heard nothing further.

I have still been unable to test the rain part of the gauges here as we haven't had any rain since the 20th Dec. I picked a bad time of year to try and get all this working.

Col.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #8 on: December 30, 2012, 12:54:29 PM »
Just did a search over there and found this....

"...summing the speed-direction vector to get the dominant wind direction..."

Looks like you might have been correct.

Col.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #9 on: December 30, 2012, 01:04:31 PM »
Stu,
Good old wikipedia to the rescue.....

The dominant winds are the trends in direction of wind with the highest speed over a particular point on the Earth's surface.

and as for the Windrose data.....

A wind rose is a graphic tool used by meteorologists to give a succinct view of how wind speed and direction are typically distributed at a particular location. Presented in a polar coordinate grid, the wind rose shows the frequency of winds blowing from particular directions. The length of each spoke around the circle is related to the frequency that the wind blows from a particular direction per unit time. Each concentric circle represents a different frequency, emanating from zero at the center to increasing frequencies at the outer circles. A wind rose plot may contain additional information, in that each spoke is broken down into color-coded bands that show wind speed ranges. Wind roses typically use 8 or 16 cardinal directions, such as north (N), NNE, NE, etc., although they may be subdivided into as many as 32 directions.

The SteelGauges only use the 8 cardinal directions for their data points.

Hope all that helps.
Col.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Steel Gauges
« Reply #10 on: December 30, 2012, 01:36:38 PM »
Hi Col,

If we look at my wind run here (attached) we can see if we chose the longest vector the result would be approx 235 degrees which seems reasonable.

WeatherCat has a SINCE9AM time period specifier for the STAT$ tag - this can be used to give data since 09:00 - for example:
Rain since 9 a.m. = STAT$RAIN:TOTAL:SINCE9AM$

Thanks for the info re: the time formatting.

Cheers,
Stu.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #11 on: December 30, 2012, 01:49:07 PM »
Thanks for that Stu,
I new there was a SINCE9AM$ but wasn't sure if you had to specifically activate it for the ones I requested or if it was available to all tags.

While I have your attention (and before I get to tired), I was wondering why the TEMPUNITS$ tag uses the html ° instead of just using the °

Col.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: Steel Gauges
« Reply #12 on: December 30, 2012, 02:09:11 PM »
Hi Col,
Yes, SINCE9AM can be used in any STAT$ tag as the time period specifier.

The &# numbers come from a post processing run WeatherCat does when it finishes processing a file - it has a (long) list of replacements it must do to ensure the proper character is displayed.

There were problems with the names not being recognised on some characters in some browsers, hence we use the numbers (but this still throws up the occasional issue)  - see http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references for details.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #13 on: December 30, 2012, 02:42:17 PM »
Thanks Stu,
I thought that was causing an issue in the gauges where it was still showing the HTML rather than the symbol but it turned out there is a bug in the original script.

Col.

UncleBuck

  • Strong Breeze
  • ***
  • Posts: 114
    • IVICTORI276
    • Point Cook Weather
  • Station Details: Oregon WMR200, MAC OS X 10.10, WeatherCat V2
Re: Steel Gauges
« Reply #14 on: December 30, 2012, 11:00:48 PM »
Just an update regarding the integration of my changes into the authors original script.

Reply from Mark:
Quote
I think I'll let the solution 'mature' a little before considering including it in the base release - when all the required tags are supported for instance.

Col.