diff options
author | Erich Eckner <git@eckner.net> | 2019-09-24 09:18:26 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-24 09:18:26 +0200 |
commit | 5a5bb02d01fce26195cff8e78e2d106b770c6507 (patch) | |
tree | 7296c39ce49486cf754b72054011d5b8a4b30baf /humidity.c | |
parent | 973ea982a7c50a53b6437c54505164f73ccfcc96 (diff) | |
download | anzeige-5a5bb02d01fce26195cff8e78e2d106b770c6507.tar.xz |
humidity: wip
Diffstat (limited to 'humidity.c')
-rw-r--r-- | humidity.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/humidity.c b/humidity.c new file mode 100644 index 0000000..527492b --- /dev/null +++ b/humidity.c @@ -0,0 +1,17 @@ +#include "humidity.h" + +double maximale_luftfeuchte(double t) +{ + for (int i=1; i<DAMPF_ANZ; i++) + if (dampf_temperaturen[i]>=t) + return (t-dampf_temperaturen[i-1])*(dampf_feuchten[i]-dampf_feuchten[i-1])/(dampf_temperaturen[i]-dampf_temperaturen[i-1]); + return -1; +} + +double taupunkt(double af) +{ + for (int i=1; i<DAMPF_ANZ; i++) + if (dampf_feuchten[i]>=af) + return (af-dampf_feuchten[i-1])*(dampf_temperaturen[i]-dampf_temperaturen[i-1])/(dampf_feuchten[i]-dampf_feuchten[i-1]); + return -1; +} |