mitä tulikaan tehtyä. Laitetaan tänne kollektiiviseen muistiin.
Lisätty Template.py tiedostoon dev_point:n jälkeen rivi
abs_hum = WeatherStation.abs_hum
Lisätty Weatherstation.py tiedostoon dev_point kohdan jälkeen rivit
def abs_hum(temp, hum):
"""Compute abs hum, using formula from
internet."""
if temp == None or hum == None:
return None
saturation = 6.1078 * math.pow(10, (7.500 * temp / (temp +
237.3)))
steam = (hum * saturation) / 100
return (216.679 * steam) / (273.15 + temp)
Lisätty plot.py tiedostoon "from Weatherstation import" kohtaan jatkoksi
, abs_hum
Templateen saa rivillä
<td>#calc "abs_hum(data['temp_out'], data['hum_out'])" "%.1f g/m³"#</td>