pyephem:如何计算进入下一个星座的时间 [英] Pyephem: how to calculate time of entering into next constellation
问题描述
Pyephem文档提供了如何计算特定时间内行星所在星座的示例.
>>> m = ephem.Moon('1980/6/1')
>>> print(ephem.constellation(m))
('Sgr', 'Sagittarius')
但是如何计算行星改变星座的时间?
由于行星可以改变天空的方向和速度,因此无法提前准确地预测何时行星将越过边界到达另一个星座.最简单的方法是将时间提前一天(或更多?或更短?或更短),直到行星的constellation()
输出更改,然后备份并确定在一天中的确切时间发生./p>
Pyephem docs have example how to calculate constellation in which planet is in certain time.
>>> m = ephem.Moon('1980/6/1')
>>> print(ephem.constellation(m))
('Sgr', 'Sagittarius')
But how to calculate time when the planet will change constellation?
Because planets can change direction and speed across the sky, there is no way to predict ahead of time exactly when a planet will cross the boundary to another constellation. The simplest approach would be to step forward in time by one day (or more? or less?) until the output of constellation()
changes for the planet, and then back up and determine at exactly what time of day the transition occurred.
这篇关于pyephem:如何计算进入下一个星座的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!