From 1e5eba2da524e258345eb9796819200ee7052f8e Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 11 Jan 2020 22:54:01 +0100 Subject: Fix west / east order --- sun.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sun.py') diff --git a/sun.py b/sun.py index 379ad64..7ceec5d 100644 --- a/sun.py +++ b/sun.py @@ -27,6 +27,6 @@ def sun_direction(lat, lon, time, time_diff, summertime_shift = 0): azimuth = np.arccos((np.cos(d) * np.sin(l) * np.cos(h) - np.sin(d) * np.cos(l)) / np.cos(altitude)) if h < 0: - return (altitude, -azimuth) - else: return (altitude, azimuth) + else: + return (altitude, -azimuth) -- cgit v1.2.3