add Dewpoint

Fork of AM2321 by Y Tomohara

Files at this revision

API Documentation at this revision

Comitter:
HB9GAA
Date:
Tue Aug 11 09:41:47 2015 +0000
Parent:
1:f42b99c425e8
Commit message:
DewPoint

Changed in this revision

AM2321.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/AM2321.cpp	Tue Aug 11 09:13:23 2015 +0000
+++ b/AM2321.cpp	Tue Aug 11 09:41:47 2015 +0000
@@ -117,7 +117,7 @@
   {
   float H, Dp;
 
-  H = (log(_result.humidity) - 2) / 0.4343 + (17.62 * _result.temperature) / (243.12 + _result.temperature);
+  H = (log10(_result.humidity) - 2) / 0.4343 + (17.62 * _result.temperature) / (243.12 + _result.temperature);
   Dp = 243.12 * H / (17.62 - H);               //das ist der Taupunkt in Celsius
-  return Dp/10;
+  return Dp;
   }