Author Topic: CGI output seems to round wind dir to nearest 45 degrees?  (Read 2165 times)

quanglewangle

  • Calm
  • *
  • Posts: 8
    • ipendeen2
  • Station Details: fine offset wh1080
CGI output seems to round wind dir to nearest 45 degrees?
« on: June 26, 2014, 07:18:34 PM »
Although the onscreen monitor reports wind direction to one decimal place, by the time it emerges from the GET request it is rounded to 45 degree increments.  Is this behavior configurable? Could I get one degree resolution?

Peter

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2916
    • 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: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #1 on: June 27, 2014, 05:07:07 PM »
Hello Peter,
Have a look at the data WeatherCat is sending in the CGI pane of the preferences - every time it sends the data, it will be updated here. Is the data rounded there? If not, the issue is at the receiving end.

quanglewangle

  • Calm
  • *
  • Posts: 8
    • ipendeen2
  • Station Details: fine offset wh1080
Re: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #2 on: June 27, 2014, 08:56:00 PM »
Thanks, WCDev. Yes, it is rounded in the CGI pane. The receiving end is mine and all I do is peel it off the GET request name-value pairs to convert it to XML for subsequent processing.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2916
    • 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: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #3 on: June 27, 2014, 10:11:24 PM »
Thanks, that's what I thought you were going to see.

The WH1080/3080 output wind direction with a resolution to 22.5 degrees. What WeatherCat logs is the average wind direction, which it computes, but what is sent to the custom CGI is the immediate wind direction direct from the console; hence the 22.5 you're seeing (you can see the immediate wind direction from your station in the 'Live Data' view from WeatherCat's 'Tools' menu).

I'll raise a feature request to either change what we send to be the average wind direction for these stations, or add average wind direction to the protocol.



quanglewangle

  • Calm
  • *
  • Posts: 8
    • ipendeen2
  • Station Details: fine offset wh1080
Re: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #4 on: June 27, 2014, 10:48:07 PM »
That's helpful and informative.  I don't need the average. Instantaneous is fine. I am driving display dials and the volatility in the pointer movements actually conveys some subjective "blustery-ness"  information to the viewer.

I didn't know about the "live data" display.  I just didn't understand why the figure in the "log" display was different (and apparently higher resolution) from what was emerging from the CGI feed. Now I do!

Thanks again.

Peter


 

quanglewangle

  • Calm
  • *
  • Posts: 8
    • ipendeen2
  • Station Details: fine offset wh1080
Re: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #5 on: July 03, 2014, 08:28:28 PM »
FYI below is a link to what I am putting together - its very much work in progress and only the gauges work, not any pages. The gauges are based on the svg ones by veleta.info but  I have removed the purely decorative background and added animation.
The pages *should* be responsive i.e. should display nicely on a mobile phone browser.

Check this out. Warning Incomplete.
http://www.fimblefowl.co.uk/respWeather/

Peter

Blicj11

  • Storm
  • *****
  • Posts: 3961
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: CGI output seems to round wind dir to nearest 45 degrees?
« Reply #6 on: July 03, 2014, 11:24:44 PM »
Starting to look nice Peter.
Blick