aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-06 14:21:25 +0200
committerMattias Andrée <maandree@kth.se>2016-07-06 14:21:25 +0200
commit22ef168e1cf51f060ca5a2ccd97e0197c8357c35 (patch)
tree27fdd8ee60bfa907974cbe1ea3d22a3e3669dc23
parentwhitespace (diff)
downloadsolar-python-22ef168e1cf51f060ca5a2ccd97e0197c8357c35.tar.gz
solar-python-22ef168e1cf51f060ca5a2ccd97e0197c8357c35.tar.bz2
solar-python-22ef168e1cf51f060ca5a2ccd97e0197c8357c35.tar.xz
The sun is not visible at sunset/sunrise + add SOLAR_ELEVATION_PRESUNSET_POSTSUNRISE
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--doc/info/solar-python.texinfo18
-rw-r--r--src/solar_python.py18
2 files changed, 23 insertions, 13 deletions
diff --git a/doc/info/solar-python.texinfo b/doc/info/solar-python.texinfo
index be6765e..96a3ac7 100644
--- a/doc/info/solar-python.texinfo
+++ b/doc/info/solar-python.texinfo
@@ -88,9 +88,13 @@ constants available:
@item SOLAR_APPARENT_RADIUS = 32 / 60
Approximate apparent size of the Sun in degrees.
-@item SOLAR_ELEVATION_SUNSET_SUNRISE = 0.0
-The Sun's elevation at sunset and sunrise, measured
-in degrees.
+@item SOLAR_ELEVATION_PRESUNSET_POSTSUNRISE = 32 / 60
+The Sun's elevation at beginning of sunset
+and end of sunrise, measured in degrees.
+
+@item SOLAR_ELEVATION_SUNSET_SUNRISE = -32 / 60
+The Sun's elevation at (end of) sunset and
+(beginning of) sunrise, measured in degrees.
@item SOLAR_ELEVATION_CIVIL_DUSK_DAWN = -6.0
The Sun's elevation at civil dusk and civil dawn,
@@ -112,19 +116,19 @@ amateur astronomical dawn, measured in degrees
The Sun's lowest and highest elevation during all
periods of twilight, measured in degrees
-@item SOLAR_ELEVATION_RANGE_CIVIL_TWILIGHT = (-6.0, 0.0)
+@item SOLAR_ELEVATION_RANGE_CIVIL_TWILIGHT = (-6.0, -32 / 60)
The Sun's lowest and highest elevation during
civil twilight, measured in degrees
-@item SOLAR_ELEVATION_RANGE_NAUTICAL_TWILIGHT = (-12.0, -0.0)
+@item SOLAR_ELEVATION_RANGE_NAUTICAL_TWILIGHT = (-12.0, -32 / 60)
The Sun's lowest and highest elevation during
nautical twilight, measured in degrees
-@item SOLAR_ELEVATION_RANGE_ASTRONOMICAL_TWILIGHT = (-18.0, -0.0)
+@item SOLAR_ELEVATION_RANGE_ASTRONOMICAL_TWILIGHT = (-18.0, -32 / 60)
The Sun's lowest and highest elevation during
astronomical twilight, measured in degrees
-@item SOLAR_ELEVATION_RANGE_AMATEUR_ASTRONOMICAL_TWILIGHT = (-15.0, -18.0)
+@item SOLAR_ELEVATION_RANGE_AMATEUR_ASTRONOMICAL_TWILIGHT = (-15.0, -32 / 60)
The Sun's lowest and highest elevation during
amateur astronomical twilight, measured in degrees
@end table
diff --git a/src/solar_python.py b/src/solar_python.py
index daa2330..a01f947 100644
--- a/src/solar_python.py
+++ b/src/solar_python.py
@@ -22,10 +22,16 @@ SOLAR_APPARENT_RADIUS = 32 / 60
'''
-SOLAR_ELEVATION_SUNSET_SUNRISE = 0.0
+SOLAR_ELEVATION_PRESUNSET_POSTSUNRISE = 32 / 60
'''
-:float The Sun's elevation at sunset and sunrise,
- measured in degrees
+:float The Sun's elevation the beginning of sunset and
+ end of sunrise, measured in degrees
+'''
+
+SOLAR_ELEVATION_SUNSET_SUNRISE = -32 / 60
+'''
+:float The Sun's elevation the (end of) at sunset and
+ (beginning of) sunrise, measured in degrees
'''
SOLAR_ELEVATION_CIVIL_DUSK_DAWN = -6.0
@@ -58,19 +64,19 @@ SOLAR_ELEVATION_RANGE_TWILIGHT = (-18.0, 0.0)
all periods of twilight, measured in degrees
'''
-SOLAR_ELEVATION_RANGE_CIVIL_TWILIGHT = (-6.0, 0.0)
+SOLAR_ELEVATION_RANGE_CIVIL_TWILIGHT = (-6.0, SOLAR_ELEVATION_SUNSET_SUNRISE)
'''
:(float, float) The Sun's lowest and highest elevation
during civil twilight, measured in degrees
'''
-SOLAR_ELEVATION_RANGE_NAUTICAL_TWILIGHT = (-12.0, 0.0)
+SOLAR_ELEVATION_RANGE_NAUTICAL_TWILIGHT = (-12.0, SOLAR_ELEVATION_SUNSET_SUNRISE)
'''
:(float, float) The Sun's lowest and highest elevation
during nautical twilight, measured in degrees
'''
-SOLAR_ELEVATION_RANGE_ASTRONOMICAL_TWILIGHT = (-18.0, 0.0)
+SOLAR_ELEVATION_RANGE_ASTRONOMICAL_TWILIGHT = (-18.0, SOLAR_ELEVATION_SUNSET_SUNRISE)
'''
:(float, float) The Sun's lowest and highest elevation during
astronomical twilight, measured in degrees