MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / dewPointFast

Function dewPointFast

libraries/Temperature/temperature.cpp:58–65  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

56// (earlier version mentions ~0.6544 but that test code is gone :(
57// http://en.wikipedia.org/wiki/Dew_point
58float 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

Callers 1

unittestFunction · 0.85

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.68