Interpolation zum Berechnen der Feuchte

This commit is contained in:
rxf
2024-08-22 12:45:24 +02:00
parent 8de24db46d
commit e66633186b
5 changed files with 97 additions and 2 deletions

23
src/interpolation.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef IUNTERPOL_H
#define INTERPOL_H
// Tabelle mit dem Wasserdampgehalt (g/m3) über der Temperatur (°C)
// Die Temperatur ist der Index in die Tabelle
// Der erste Wert ist der von 15°C (index 0)
const float dampftabelle[] = {
// 15, 16, 17, 18, 19
12.85, 13.65, 14.50, 15.40, 16.30,
// 20, 21, 22, 23, 24, 25, 26, 27, 28, 29
17.30, 18.35, 19.40, 20.55, 21.80, 23.05, 24.35, 25.75, 27.20, 28.7,
// 30, 31, 32, 33, 34, 35 36
30.35, 32.05, 33, 85, 35.70, 37.65, 39.6, 41.7};
const int indexOffset = 15;
const float tempOffset = 3.2;
const float humOffset = 5.0;
float getDampfgehalt(float temp);
int getRelativeFeuchte(float temp, float hum);
#endif