pyephem:如何计算进入下一个星座的时间 [英] Pyephem: how to calculate time of entering into next constellation

查看:120
本文介绍了pyephem:如何计算进入下一个星座的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

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