Author Topic: Radomir's wxwugraphs - Hourly Dewpoint Calculations  (Read 503 times)

0 Members and 1 Guest are viewing this topic.

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Radomir's wxwugraphs - Hourly Dewpoint Calculations
« on: July 27, 2019, 01:58:32 PM »
Anyone ever notice that the hourly temp/DP graph does not calculate the Dewpoint correctly from the clientrawhour.txt file? Currently it is off by +8°. The daily graph shows correctly. checked the clientrawhour.txt file and it is correct.

here is the calculation in the file:
Code: [Select]
    // dewpoint calculation
    $c = 0;
    foreach ($temp as $val) {
      $gtrh = ((17.271*$val)/(237.7+$val))+log($humi[$c]/100);
      $dewp[] = round((237.7*$gtrh)/(17.271-$gtrh), 1);
      //$dewp[] = $val-((100-$humi[$c])/5); // low accuracy (+/- 1degC and more under of 50% humidity)
      $chdewp[] = round((237.7*$gtrh)/(17.271-$gtrh), 1);
      $c++; 
    }

I'm not smart enough to check it!  :roll:
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS