summaryrefslogtreecommitdiffstats
path: root/src/solar.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/solar.py')
-rw-r--r--src/solar.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/solar.py b/src/solar.py
index 03cb7ce..55a325a 100644
--- a/src/solar.py
+++ b/src/solar.py
@@ -448,6 +448,20 @@ def have_sunrise_and_sunset(latitude, t = None):
return -90 - d < latitude < 90 + d ## Northern winter
+# TODO document and demo
+def is_summer(latitude, t = None):
+ t = julian_centuries() if t is None else t
+ d = solar_declination(t)
+ return (d > 0) == (latitude > 0)
+
+
+# TODO document and demo
+def is_winter(latitude, t = None):
+ t = julian_centuries() if t is None else t
+ d = solar_declination(t)
+ return not ((d > 0) == (latitude > 0))
+
+
def future_past_elevation(delta, latitude, longitude, elevation, t = None):
'''
Predict the time point of the next or previous time the Sun reaches or reached a specific elevation