You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defnightMask(day, time, lat, lon):
sun_height=90000observer=ephem.Observer()
observer.lat, observer.lon, observer.elevation=str(lat), str(lon), sun_heightobserver.date=day+' '+time# print(day, time, lat, lon)try:
ifobserver.previous_rising(ephem.Sun()).datetime() >observer.previous_setting(ephem.Sun()).datetime():
returnFalseelse:
returnTrueexcept:
returnNone
Ephem version: 4.1.3.
UPD: Updated to 4.1.4, still not working.
The text was updated successfully, but these errors were encountered:
that function nightMask(...) returns True if the time arguments represent a time between the previous sunset, and that previous sunset's subsequent rising, which is essentially the same information that sun.alt < 0 returns. there is no difference unless there is an issue with the sun not being a point; even if that is an issue, sun.alt could be compared to a small negative number, e.g. half the angular width of the sun, to get the same information.
Parametrs:
2015/6/27 22:57:57.947291 65.7959 -123.7879
Ephem version: 4.1.3.
UPD: Updated to 4.1.4, still not working.
The text was updated successfully, but these errors were encountered: