cloudy

Author Topic: Wind Run Units  (Read 162 times)

0 Members and 1 Guest are viewing this topic.

Offline Sask

  • Posts: 149
  • Sussex NB, Canada to Dargaville NZ
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 8.0
    • Mahuta Rd, Dargaville - New Zealand
Wind Run Units
« on: January 04, 2012, 11:38:29 PM »
I have everything that I can find set to km in the php's. Yet on my webpage the windrun insists on staying in miles.

Is there a setting somewhere I am missing? Perhaps someone would tell me what it is I have missed.

I have searched the forums and I am not finding a fix.

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win XP
  • Firefox 9.0.1
    • Saratoga Weather
Re: Wind Run Units
« Reply #1 on: January 05, 2012, 02:24:42 AM »
Your testtags.php?sce=view shows
Code: [Select]
$windruntodatethismonth = '1629.03 km';
$windruntodatethisyear = '1629.03 km';
$windruntoday = '112.77';
so WD is reporting it in km.

Your wxtrends.php page is showing
Quote
WIND RUN
Today    114.57 km
Month    1630.83 km
Year    1630.83 km

I didn't see where else windrun is reported?  Which page is showing the problem?

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win XP
  • Firefox 9.0.1
    • Saratoga Weather
Re: Wind Run Units
« Reply #2 on: January 05, 2012, 02:40:57 AM »
Ah.. my bad (eyes).. what you're referring to is
Quote
Wind Run:    117.75 miles
in the alternative dashboard.

That is created by
Code: [Select]
                <td class="data2" nowrap="nowrap"><?php langtrans('Wind Run'); ?>: </td>
                <td class="data2" nowrap="nowrap" style="text-align: right;">
  <?php echo $windruntoday " " $uomDistance?>
</td>
and $uomDistance comes from
Code: [Select]
$uomDistance = ' miles'; in ajax-dashboard6.php

Change that to
Code: [Select]
$uomDistance = ' km'; and your display should reflect 'km' instead of 'miles'.

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline TokKiwi

  • Techno Dad
  • Posts: 4,297
  • Mech Engineer and Hobbyist
  • Tokoroa, Sth Waikato, New Zealand
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Opera 11.60
    • Tokoroa North Weather
Re: Wind Run Units
« Reply #3 on: January 05, 2012, 03:23:33 AM »
Well done Ken - you spent some time sorting through that and diagnosing the data... And providing the solution - efficient as always! :)
Dad's have hobbies because they are children's rugby, football and Committee Fathers!!

Offline Sask

  • Posts: 149
  • Sussex NB, Canada to Dargaville NZ
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Firefox 8.0
    • Mahuta Rd, Dargaville - New Zealand
Re: Wind Run Units
« Reply #4 on: January 05, 2012, 04:20:10 AM »
Thank you Ken...that fixed it.

 

cumulus