Author Topic: ajax-dashboard6.php version 95e last hour dew too high  (Read 1129 times)

0 Members and 1 Guest are viewing this topic.

Offline hcorrin

  • Contributor
  • ***
  • Posts: 126
    • Ballaugh Weather
ajax-dashboard6.php version 95e last hour dew too high
« on: April 14, 2022, 09:18:40 AM »
i notice since putting the 95e version on of the alternate dashboard the the last hour dew value is wrong https://www.hc-iom.co.uk/WD-AJAX1/index.php
the 95c version gives this https://www.hc-iom.co.uk/WD-AJAX3/index.php
not sure what i need to change to get it right

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: ajax-dashboard6.php version 95e last hour dew too high
« Reply #1 on: April 14, 2022, 03:29:19 PM »
In 695e the line
Code: [Select]
<span class="convDdif"><?php echo strip_units(abs($dewchangelasthour)) . $uomTemp?></span>  was used to reflect it was a difference.  695c had that coded as
Code: [Select]
<span class="convTemp"><?php echo strip_units(abs($dewchangelasthour)) . $uomTemp?></span> for a temperature.  With testtags.php having
Code: [Select]
$dewchangelasthour =  '-0.2';    // Dew point change last hour
the convertDdif function of
Code: [Select]
Number.prototype.convertDdif = function() { // °C
switch (uom.Temp) {
case "°F"    :
case "&deg;F": return((this * 1.8) + 32.0);
default      : return((this * 1.0) + 17.8);
}
};
in ajaxWDwx3.js was in error.  It should read as
Code: [Select]
Number.prototype.convertDdif = function() { // °C
switch (uom.Temp) {
case "°F"    :
case "&deg;F": return((this * 1.8));
default      : return((this * 1.0));
}
};
to reflect the differences in degree scales from C to F without the offset.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline hcorrin

  • Contributor
  • ***
  • Posts: 126
    • Ballaugh Weather
Re: ajax-dashboard6.php version 95e last hour dew too high
« Reply #2 on: April 14, 2022, 05:09:40 PM »
ok have corrected the ajaxWDwx3.js and the value looks ok now
Thanks Ken

 

anything