欢迎使用Skyfield存储库
Skyfield是一个纯Python天文软件包,与Python 2和3兼容,并且可以轻松生成行星和地球卫星的高精度研究级位置。
from skyfield . api import load
planets = load ( 'de421.bsp' )
earth , mars = planets [ 'earth' ], planets [ 'mars' ]
ts = load . timescale ()
t = ts . now ()
position = earth . at ( t ). observe ( mars )
ra , dec , distance = position . radec ()
print ( ra )
print ( dec )
print ( distance )
结果:
10h 47m 56.24s
+09de
2022-11-26 21:04:20
81.48MB
Python
1