25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516
  1. #!/usr/bin/env python3
  2. import ephem
  3. import time
  4. import sys
  5. date = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(sys.argv[1])+3*60*60))
  6. obs=ephem.Observer()
  7. obs.lat='change_latitude'
  8. obs.long='change_longitude'
  9. obs.date = date
  10. sun = ephem.Sun(obs)
  11. sun.compute(obs)
  12. sun_angle = float(sun.alt) * 57.2957795 # Rad to deg
  13. print(int(sun_angle))