From 21b65a1e3948b448ae06324a9a48fad8d4165600 Mon Sep 17 00:00:00 2001 From: rene Date: Sat, 16 May 2026 13:53:05 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Asphalttemperatur-Formel=20temperaturabh?= =?UTF-8?q?=C3=A4ngig=20(t=5Ffactor=200..1=20zwischen=205-30=C2=B0C),=20ni?= =?UTF-8?q?cht=20mehr=20temperaturblind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/weather.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/weather.py b/backend/weather.py index cdf09d8..9bec358 100644 --- a/backend/weather.py +++ b/backend/weather.py @@ -239,7 +239,9 @@ def _wind_dir(deg: float) -> str: def _asphalt_temp(air_max: float, uv_max: float) -> tuple[float, str]: - bonus = min(uv_max * 3.0, 30.0) + # UV-Bonus skaliert mit Temperatur: unter 10°C kaum Aufheizung, ab 30°C voll + t_factor = max(0.0, min(1.0, (air_max - 5) / 25)) + bonus = min(uv_max * 3.0 * t_factor, 30.0) asphalt = air_max + bonus if asphalt <= 30: warn = 'safe'