dewPointFast() is > 5x faster than dewPoint() - run dewpoint_test.ino delta mdewPointFastax with dewPoint() - run dewpoint_test.ino ==> ~0.347 (earlier version mentions ~0.6544 but that test code is gone :( http://en.wikipedia.org/wiki/Dew_point
| 56 | // (earlier version mentions ~0.6544 but that test code is gone :( |
| 57 | // http://en.wikipedia.org/wiki/Dew_point |
| 58 | float dewPointFast(float celsius, float humidity) |
| 59 | { |
| 60 | float a = 17.271; |
| 61 | float b = 237.7; |
| 62 | float temp = (a * celsius) / (b + celsius) + log(humidity/100); |
| 63 | float Td = (b * temp) / (a - temp); |
| 64 | return Td; |
| 65 | } |
| 66 | |
| 67 | |
| 68 | // https://en.wikipedia.org/wiki/Humidex |