|
@@ -0,0 +1,16 @@ |
|
|
|
|
|
#!/usr/bin/env python3 |
|
|
|
|
|
import ephem |
|
|
|
|
|
import time |
|
|
|
|
|
import sys |
|
|
|
|
|
timezone = change_tz + time.localtime().tm_isdst |
|
|
|
|
|
date = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(sys.argv[1])-(timezone*60*60))) |
|
|
|
|
|
|
|
|
|
|
|
obs=ephem.Observer() |
|
|
|
|
|
obs.lat='change_latitude' |
|
|
|
|
|
obs.long='change_longitude' |
|
|
|
|
|
obs.date = date |
|
|
|
|
|
|
|
|
|
|
|
sun = ephem.Sun(obs) |
|
|
|
|
|
sun.compute(obs) |
|
|
|
|
|
sun_angle = float(sun.alt) * 57.2957795 # Rad to deg |
|
|
|
|
|
print(int(sun_angle)) |