#!/usr/bin/python3 ## The half moon is setting. What's the angle of the perpendicular of ## the terminator, with the horizon of me, the observer? ## In winter, almost flat... ## Copyright : https://www.gnu.org/licenses/gpl.html ## Author : https://www.jidanni.org/ ## Created On : Fri May 21 01:53:38 2021 ## Last Modified By: Dan Jacobson ## Last Modified On: Fri May 21 03:17:22 2021 ## Update Count : 28 # /usr/lib/python3/dist-packages/ephem/doc/quick.rst import ephem, math p = ephem.Observer() p.lon, p.lat = "120.86617", "24.18169" p.date = ephem.now() date2 = p.date + 365 * 11 sun = ephem.Sun() while p.date <= date2: p.date = ephem.next_first_quarter_moon(p.date) p.date = p.next_setting(ephem.Moon()) sun.compute(p) print("%2.0f %.19s" % ((sun.alt * 180 / math.pi) + 90, ephem.localtime(p.date))) # Related?: # https://en.wikipedia.org/wiki/Terminator_(solar)#Lunar_terminator_illusion