Additional Wind Run Changes & Information:
I discovered that Wind Run is actually reported and updated in clientraw.txt in Km as the last variable, 173. My site now uses ajax to update Wind Run every few seconds if it has changed. The code modifications include both ajaxWDwx.js and ajax-dashboard6.php. This code no longer uses testtags.php as the source of Wind Run, and it uses a fixed initial wind run UOM, Km.
In ajaxWDwx.js I've added a section for windrun shown here in context:
beaufortnum = ajax_getBeaufortNumber(clientraw[2]);
// Wind Run
//clientraw[173] = 25.5
windrun = parseFloat(clientraw[173]).convertDist(); // Wind Run Today
;;;set_ajax_obs('ajaxwindrun', windrun.toFixed(dp.Dist) +' '+ uom.Dist);
// Wind gust
Another modification is to change the two distance conversions back to their old form but using the 1.6 divisor:
// distance miles and meters to km
case "m" : return (this / 1000);
case "Km" : return (this * 1);
case "miles" : return (this / 1.6);
// altitude to meters
and
Number.prototype.convertDist = function() { // km
switch (uom.Dist) {
case "Km" : return (this * 1);
case "m" : return (this / 1000);
case "miles" : return (this / 1.6);
default : return (this * 1);
}
};
// Switch date between Euro and US format i.e. 21-03-2010 to 3/21/2010 or 27-Sep-2012 to 09/27/2012
The Wind Run section of ajaxdashboard6.php now reads:
<tr>
<td class="data2" nowrap="nowrap"><?php langtrans('Wind Run'); ?>: </td>
<td class="data2" nowrap="nowrap" style="text-align: right;">
<span class="ajax" id="ajaxwindrun"><span class="convDist"><?php echo $windrun . " " . $uomDistance;?></span></span>
</td>
</tr>
.
You can check it out on
my site.