Added frost risk

This commit is contained in:
2026-06-27 18:31:44 -04:00
parent 9471e904ce
commit 30c866b599
6 changed files with 93 additions and 145 deletions

View File

@@ -18,3 +18,11 @@ export async function fetchIcon(icon) {
await downloadIcon(icon, iconPath);
return iconPath;
}
export function frostRisk(tempC, dewPointC, humidity) {
if (tempC > 4) return 'None'
if (tempC <= 0 && dewPointC <= 0) return 'High'
if (tempC <= 2 && humidity > 85) return 'Moderate'
if (tempC <= 4) return 'Low'
return 'None'
}