From aeb4181bc9687b7c7e387abe9c8c467e84865ac0 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 23 Sep 2020 18:12:56 +0300 Subject: Implement get_location_topos --- iss/tests/test_predictions.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'iss/tests') diff --git a/iss/tests/test_predictions.py b/iss/tests/test_predictions.py index 541b2d8..daa2bf4 100644 --- a/iss/tests/test_predictions.py +++ b/iss/tests/test_predictions.py @@ -1,3 +1,5 @@ +from skyfield.api import Topos + from ..predictions import Predictions @@ -7,3 +9,11 @@ def test_get_timescales(): t0, t1 = p.get_next_days_timescale(days=days) delta = t1.ut1 - t0.ut1 assert delta == days + + +def test_get_location(): + p = Predictions(lat=32.0853, lng=34.7817) + tlv = Topos("32.0853 N", "34.7817 E") + topos = p.get_location_topos() + assert topos.latitude.degrees == tlv.latitude.degrees + assert topos.longitude.degrees == tlv.longitude.degrees -- cgit v1.3.1