summaryrefslogtreecommitdiff
path: root/iss/predictions.py
diff options
context:
space:
mode:
Diffstat (limited to 'iss/predictions.py')
-rw-r--r--iss/predictions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/iss/predictions.py b/iss/predictions.py
index 29bcf2c..1bdd10e 100644
--- a/iss/predictions.py
+++ b/iss/predictions.py
@@ -77,7 +77,13 @@ class Predictions(object):
# docs mention the possibilibity of several culminations
# https://rhodesmill.org/skyfield/earth-satellites.html#finding-when-a-satellite-rises-and-sets
# but this doesn't seem to happen in our case
- return list(chunks(ts, 3))
+ res = list(chunks(ts, 3))
+
+ if len(res[-1]) != 3:
+ # truncate the last event in case it's a partial one
+ res = res[:-1]
+
+ return res
def get_predictions(self):
preds = self.get_prediction_events()