我有望远镜图像中心的天体坐标、望远镜的视野(以秒为单位)、拍照的开始时间(全天)和曝光时间(以秒为单位)。我想知道有多少 Starlink 卫星可以进入图像帧。我无法弄清楚如何正确计算。我不太了解天体坐标。我尝试使用 Skyfield api、地心坐标并假设望远镜指向上方。但是它太长了,并且无法正常工作...
这是我迄今为止尝试做的。
import skyfield.timelib
from skyfield.api import Topos, load
from datetime import timedelta
def satnum(start_time, exposition, eq_cords, field_of_view):
"""Counts number of satellites
Arguments
---------
:param start_time: skyfield.timelib.Time object
:param exposition: int
:param eq_cords: list of floats
:param field_of_view: int
Returns
-------
:return: int
Examples
--------
import satnum
start_time = [2020, 12, 14, 18, 00, 00]
exposition = 15
eq_cords = [4741.1, -2257.7, 4505.7]
field_of_view = 45
satnum.satnum(start_time, exposition, eq_cords, field_of_view)
0
"""
url = "https://celestrak.com/NORAD/elements/starlink.txt"
satellites = load.tle_file(url)
sat_counter = 0
ts = load.timescale()
eq_cords = Topos(*eq_cords)
for satellite in satellites:
difference = satellite - eq_cords
for n in range(exposition):
time = ts.utc(start_time.utc_datetime() + timedelta(seconds=n))
topocentric = difference.at(time)
altaz = topocentric.altaz()
if altaz[0].degrees >= 90 - (field_of_view/2)/60:
sat_counter += 1
break
return sat_counter
我会很感激任何想法。