1
0
Fork 0

Added checking if satellite was always above horizon

merge-requests/2/head
Michał Drzał 2022-06-25 17:02:03 +02:00 committed by GitHub
parent b431056efb
commit 9650be06d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ def main():
for sat_info in satellite_info:
satellite = EarthSatellite(sat_info["tle"][-2], sat_info["tle"][-1])
t, events = satellite.find_events(site_location, t0, t1, altitude_degrees=0.0)
alt, _, _ = (satellite - site_location).at(t0).altaz()
if len(t) == 0 and alt.degrees > 0:
t, events = [t0, t1], [0,2]
if len(t) > 0:
pairs = [ (ti, event) for ti, event in zip(t, events)]
if pairs[0][1] in [1,2]: