Observer() 的结果似乎没有考虑 PyEphem 中的海拔影响
我对 PyEphem 模块给出的与 Observer() 查询相关的结果以及海拔的影响进行了查询。我从几个来源了解到(例如http://curious.astro.cornell.edu/question)。 php?number=388)表明观察者的海拔对日落时间有显着影响。然而,在下面的代码中,我看到几乎没有什么区别:
import ephem
emphemObj = ephem.Observer()
emphemObj.date = '2011/08/09'
emphemObj.lat = '53.4167'
emphemObj.long = '-3'
emphemObj.elevation = 0
ephemResult = ephem.Sun()
ephemResult.compute(emphemObj)
print "Sunset time @ 0m: " + str(emphemObj.previous_rising(ephemResult))
emphemObj.elevation = 10000
ephemResult.compute(emphemObj)
print "Sunset time @ 10000m: " + str(emphemObj.previous_rising(ephemResult))
我得到输出:
Sunset time @ 0m: 2011/8/8 04:38:34
Sunset time @ 10000m: 2011/8/8 04:38:34
我相当确定我做错了什么而不是这是一个错误,但在尝试了多种不同的方法后,我担心我继续以相同的结果结束。有谁知道我在这里做错了什么?
我已经在 https://launchpad.net/pyephem 上发布了此内容,但没有得到回复。我希望我没有从根本上误解海拔函数的目的......
I've a query on the results given by the PyEphem module relating to Observer() queries, and the effects of elevation. I understand from a couple of sources (such as http://curious.astro.cornell.edu/question.php?number=388) that the elevation of the observer has a marked effect on sunset time. However in the following code, I see next to no difference:
import ephem
emphemObj = ephem.Observer()
emphemObj.date = '2011/08/09'
emphemObj.lat = '53.4167'
emphemObj.long = '-3'
emphemObj.elevation = 0
ephemResult = ephem.Sun()
ephemResult.compute(emphemObj)
print "Sunset time @ 0m: " + str(emphemObj.previous_rising(ephemResult))
emphemObj.elevation = 10000
ephemResult.compute(emphemObj)
print "Sunset time @ 10000m: " + str(emphemObj.previous_rising(ephemResult))
I get the output:
Sunset time @ 0m: 2011/8/8 04:38:34
Sunset time @ 10000m: 2011/8/8 04:38:34
I'm fairly sure I'm doing something wrong rather than this being a bug, but having tried a number of different ways, I'm afraid I keep winding up with the same results. Does anyone know what I'm doing wrong here?
I posted this on https://launchpad.net/pyephem already, but I've had no response. I'm hoping I've not fundamentally misunderstood the purpose of the elevation function...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
观察者的
海拔
是指其所在位置的海拔高度,例如亚利桑那州弗拉格斯塔夫的海拔。但据推测,不仅观察者和他们的望远镜或双筒望远镜处于这个海拔高度;据推测,地面——以及地平线——也处于这个高度。因此,增加海拔
相对于地平线来说并没有任何优势,因为当您移动到海拔更高的城市时,地平线会随着您移动。用铅笔和黄色纸片几分钟后,看起来与地平线的角度
hza
与地球半径r
和您距地面的高度有关h
如下:因此,按照上面的示例:
我得到输出:(
请注意,“sunrise”与
previous_rising()
一起使用,而“sunset”与next_setting()
!)The
elevation
of an observer means the elevation above sea level of their location — like the altitude of Flagstaff, Arizona, for example. But it is presumed that not only the observer and their telescope or binoculars is this distance above sea level; it is presumed that the ground — and thus the horizon — are also at this altitude. So an increasedelevation
gives you no advantage relative to the horizon, because the horizon moves with you when you move to a higher-altitude city.After a few minutes with a pencil and yellow pad of paper, it looks like the angle down to the horizon
hza
is related to the earth's radiusr
and your height above the groundh
as follows:So following on from your example above:
I get the output:
(Note that "sunrise" goes with
previous_rising()
and "sunset" goes withnext_setting()
!)