Author Topic: Pywws Weather Nature Template in km/h ?  (Read 4984 times)

Offline satbeppo

  • New member
  • *
  • Posts: 2
    • none
Pywws Weather Nature Template in km/h ?
« on: October 10, 2012, 01:53:29 PM »
First many thanks from Germany for your great Work.
Your Template works fiine on my Allnet6100 aka NSLU2.

There is only one problem for me. The Wind is displayed as mph and i need km/h.

Is it possible to build this Template for displaying the wind and the roses in km/h.
Im not feeling fit enough to change it by my self.

Or is it possible for someone who changed the template to km/h, to send me a copy of the Template files that needed here for?

Thanks and many Greets from Lower Saxony Germany

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Pywws Weather Nature Template in km/h ?
« Reply #1 on: October 10, 2012, 05:48:30 PM »
Hi,

I'm very happy to read from an other pywws user!  ;D
For help with metric measures, I can refer you to that discussion:
http://weatherbyyou.com/forum/index.php?topic=442.msg1455#msg1455

But since there is an interest with this adaptation I'll think of a new version
offering both measure on it.

If others have made this version and want to share it, I'll be happy to mention
his help in template file.

Regards,
Jacques
Please, consider supporting this site 

Offline jimicek

  • New member
  • *
  • Posts: 9
    • JiM's page
Re: Pywws Weather Nature Template in km/h ?
« Reply #2 on: October 11, 2012, 01:43:41 AM »
Hello,
changing to km/h is very easy:

- in all relevant .txt templates replace wind_mph to wind_kmph,
eg.
<td>#wind_ave "%.0f <small>mph</small>" "-" "wind_mph(x)"#</td>
change to
<td>#wind_ave "%.0f <small>km/h</small>" "-" "wind_kmph(x)"#</td>

-in plot templates change the appropriate section of .png.xml file as in following example:
  <plot>
    <title>Wind speed (km/h)</title>
    <yrange>0, 100</yrange>
    <source>raw</source>
    <subplot>
      <colour>4</colour>
      <ycalc>wind_kmph(data['wind_gust'])</ycalc>
      <title>gust</title>
    </subplot>
    <subplot>
      <colour>3</colour>
      <ycalc>wind_kmph(data['wind_ave'])</ycalc>
      <title>average</title>
    </subplot>
  </plot>

- in wind roses plots follow this example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<graph>
  <size>600, 700</size>
  <title>Wind over the last hour (km/h)</title>
  <duration>hours=1</duration>
  <windrose>
    <source>raw</source>
    <ycalc>wind_kmph(data['wind_ave'])</ycalc>
    <yrange>*</yrange>
    <threshold>1, 5, 12, 20, 30, 40, 50</threshold>
    <colour>0, 6, 7, 2, 5, 3, 4, 1</colour>
  </windrose>
</graph>

Regards from Czech rep.
Jimicek

Offline satbeppo

  • New member
  • *
  • Posts: 2
    • none
Re: Pywws Weather Nature Template in km/h ?
« Reply #3 on: October 11, 2012, 02:51:22 AM »
Hi Jimicek
Superb! it works fine ! ;D ;D ;D
Never thought it is so easy.
Thanks so much!

One new Question in have. Is it possible to autoscale the Graphs??
Maybe works  a "*" in yrange???

p.s.
"*" in yrange works really fine

Greeting from Germany
Satbeppo
« Last Edit: October 11, 2012, 06:58:21 AM by satbeppo »