fix azimut
Some checks failed
CI and deploy / migration-check (push) Failing after 19s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-27 18:12:05 +02:00
parent 8960576ee8
commit cc674900cc

View File

@@ -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]: