1
0
Fork 0

Catch old TLEs exception on passes calculations

environments/stage/deployments/292
Alfredos-Panagiotis Damkalis 2019-01-28 23:35:48 +02:00
parent 54fcc6c4e7
commit 71c7aa2fcb
1 changed files with 6 additions and 2 deletions

View File

@ -232,6 +232,7 @@ def predict_available_observation_windows(station, min_horizon, overlapped, tle,
:return: List of passes found and list of available observation windows
'''
passes_found = []
station_windows = []
# Initialize pyehem Satellite for propagation
satellite = ephem.readtle(*tle)
# Initialize pyephem Observer for propagation
@ -244,9 +245,12 @@ def predict_available_observation_windows(station, min_horizon, overlapped, tle,
observer.horizon = str(min_horizon)
else:
observer.horizon = str(station.horizon)
satellite.compute(observer)
station_windows = []
try:
satellite.compute(observer)
except ValueError:
return passes_found, station_windows
while True:
try:
pass_params = next_pass(observer, satellite)