diff --git a/backend/services/forecast_service.py b/backend/services/forecast_service.py index d222b21..a950487 100644 --- a/backend/services/forecast_service.py +++ b/backend/services/forecast_service.py @@ -19,8 +19,11 @@ logger = logging.getLogger(__name__) def _db_azimuth_to_pvlib(surface_azimuth_db_deg: float) -> float: - """DB: 0=jih, 90=západ, -90=východ → pvlib (N=0, E=90, S=180, W=270).""" - return float((surface_azimuth_db_deg + 180) % 360) + """ + EMS DB používá standardní azimut (kompasové stupně): + N=0, E=90, S=180, W=270 (stejně jako pvlib). + """ + return float(surface_azimuth_db_deg % 360) async def fetch_pv_forecast(site_id: int, db) -> tuple[int, int]: