aboutsummaryrefslogtreecommitdiff
path: root/sun.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-01-11 22:54:01 +0100
committerAdrian Kummerlaender2020-01-11 22:54:01 +0100
commit1e5eba2da524e258345eb9796819200ee7052f8e (patch)
tree5b79b2695ec600647ae5781f35b712e2bd1437e5 /sun.py
parent071bc3e6439d7775e9684dfeeb27d423d47167a9 (diff)
downloadfirmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar.gz
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar.bz2
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar.lz
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar.xz
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.tar.zst
firmament-1e5eba2da524e258345eb9796819200ee7052f8e.zip
Fix west / east order
Diffstat (limited to 'sun.py')
-rw-r--r--sun.py4
1 files changed, 2 insertions, 2 deletions
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)