roam-location/weather
Adriano Caloiaro 567845f88e
fix(weather): apply Beer-Lambert extinction to clear-sky model
The simple atmosphericCeiling*sin(elevation) model overestimates clear-sky
radiation at low sun angles because it ignores the longer atmospheric path
light travels near the horizon. At 5° elevation the path is ~11x vertical,
making the real clear-sky ceiling ~26 W/m² rather than the 83 W/m² the
naive model predicts — causing sunny low-angle readings to be misclassified
as mostly cloudy.

Replace with the Beer-Lambert correction:
  expectedClearSky = 950 * exp(-opticalDepth / sin(elevation)) * sin(elevation)

opticalDepth=0.1 (clear atmosphere) produces accurate values across all
angles: ~26 W/m² at 5°, ~93 W/m² at 10°, ~715 W/m² at solar noon.
2026-04-12 07:39:31 -06:00
..
condition.go fix(weather): apply Beer-Lambert extinction to clear-sky model 2026-04-12 07:39:31 -06:00
weather.go feat: append location snapshots to WebDAV JSON log on each poll 2026-04-10 08:45:50 -06:00