Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Figure it out yourself. solution in Clear category for Sun Angle by veky
from datetime import datetime
from scipy.interpolate import interp1d
solutions = {'06:00': 0, '12:00': 90, '18:00': 180}
stamp = lambda time: datetime.strptime(time, '%H:%M').timestamp()
line = interp1d([*map(stamp, solutions)], [*solutions.values()])
def sun_angle(time):
try: return line(stamp(time))[()]
except ValueError: return "I don't see the sun!"
April 21, 2018
Comments: