使用PyEphem计算黎明和日落时间 [英] Calculating dawn and sunset times using PyEphem

查看:120
本文介绍了使用PyEphem计算黎明和日落时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 PyEphem 计算黎明,黄昏和日落时间?我曾经用PyEphem产生白天和黑夜的时间,但是在日落/黄昏/黎明时什么都没找到

Is it possible to calculate Dawn, Dusk, and sunset times using PyEphem? I've used PyEphem to produce day and night time, but I didn't find anything on sunset/dusk/dawn

推荐答案

有关 黎明和黄昏 ,请参见

For dawn amd dusk, see pyephem documentation regarding twilight
In a nutshell, dawn and dusk express the time when the center of the Sun is at a particular angle below the horizon; the angle used for this calculation varies for the definition of the "civilian", navigation (nautical) and astronomical twilights which use 6, 12 and 18 degrees respectively.

与之相反, 日出 对应于太阳的边缘出现(或消失,对于日落)恰好在上方/下方的时间地平线(0度).因此,每个人,平民,水手和天文学爱好者都将获得相同的上升/设定时间. (请参见 海军天文台的上升和设置 >在pyephem文档中).

In opposition the sunrise corresponds to the time when the edge of the Sun appears (or disappears, for sunset) just above/below the horizon (0 degree). Hence everybody, civilians, sailors and astronomy enthusiasts alike get the same rise/set times. (see Naval Observatory risings and settings in pyephem documentation).

总结,一旦正确设置了pyephem.Observer的参数(设置其经度,纬度,日期,时间,压力(海拔高度为?)等),各种黄昏时间(从
获取日出和日落的时间,以及日出和日落的时间 Observer.previous_rising()Observer.next_setting()方法,
 从而  第一个参数是ephem.Sun()
  use_center=参数需要设置为True进行暮光计算,并且
 地平线为0(如果考虑大气折射,则为0:34)或-6,-12或-18.

To summarize, once one has properly parametrized an pyephem.Observer (setting its lat, long, date, time, pressure (? for altitude?), etc.), the various twilight times (dawn, dusk) and the sunrise and sunset times are obtained from the
Observer.previous_rising() and Observer.next_setting() methods,
  whereby   the first argument is ephem.Sun() and
  the use_center= argument needs to be set to True for twilight calculations, and
  the horizon is either 0 (or 0:34 if you account for refraction of the atmosphere) or -6, -12 or -18.

这篇关于使用PyEphem计算黎明和日落时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆