aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-06 20:18:11 +0200
committerMattias Andrée <maandree@kth.se>2016-07-06 20:18:11 +0200
commitbee253f496498c658c89e70611eb51b4fbf8cca3 (patch)
tree7f4f5366c18b19c8cee335b208a70b8580798200
parentUse the constants from solar-python (diff)
downloadxpybar-bee253f496498c658c89e70611eb51b4fbf8cca3.tar.gz
xpybar-bee253f496498c658c89e70611eb51b4fbf8cca3.tar.bz2
xpybar-bee253f496498c658c89e70611eb51b4fbf8cca3.tar.xz
Doc solar-python dep + add golden hour and blue hour1.15
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--DEPENDENCIES1
-rw-r--r--src/plugins/solar.py15
2 files changed, 16 insertions, 0 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES
index d7ec318..72ca15f 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -22,6 +22,7 @@ OPTIONAL RUNTIME DEPENDENCIES:
imagemagick: for image support
file: for image support
librsvg: for image support
+ solar-python>=2.5: for solar data
BUILD DEPENDENCIES:
diff --git a/src/plugins/solar.py b/src/plugins/solar.py
index 6873189..038e71b 100644
--- a/src/plugins/solar.py
+++ b/src/plugins/solar.py
@@ -86,6 +86,21 @@ class Solar:
amateur astronomical twilight, measured in degrees
'''
+ SOLAR_ELEVATION_RANGE_GOLDEN_HOUR = solar_python.SOLAR_ELEVATION_RANGE_GOLDEN_HOUR
+ '''
+ :(float, float) The Sun's lowest and highest elevation during
+ the golden "hour" (also known as magic hour),
+ measured in degrees. These elevations are
+ approximate.
+ '''
+
+ SOLAR_ELEVATION_RANGE_BLUE_HOUR = solar_python.SOLAR_ELEVATION_RANGE_BLUE_HOUR
+ '''
+ :(float, float) The Sun's lowest and highest elevation during
+ the blue "hour", measured in degrees. These
+ elevations are approximate.
+ '''
+
EQUINOX = 0
SUMMER = 1