diff options
| author | Yuval Adam <_@yuv.al> | 2020-09-20 22:19:06 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2020-09-20 22:19:06 +0300 |
| commit | 045fe24098a81cd64e1bbfb6b6a20595d4176a24 (patch) | |
| tree | 79c99650346b2b71e2e2065b0e3104f4edd15f59 /iss.py | |
Initial commit
Diffstat (limited to 'iss.py')
| -rw-r--r-- | iss.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +from skyfield.api import Topos, load + +stations_url = 'http://celestrak.com/NORAD/elements/stations.txt' +satellites = load.tle_file(stations_url) +print('Loaded', len(satellites), 'satellites') + +by_name = {sat.name: sat for sat in satellites} +satellite = by_name['ISS (ZARYA)'] +print(satellite) + +tlv = Topos('32.0853 N', '34.7817 E') + +ts = load.timescale() +t0 = ts.utc(2020, 9, 20) +t1 = ts.utc(2020, 9, 30) + +t, events = satellite.find_events(tlv, t0, t1, altitude_degrees=60.0) +for ti, event in zip(t, events): + name = ('rise above 30°', 'culminate', 'set below 30°')[event] + print(ti) + print(ti.utc_strftime('%Y %b %d %H:%M:%S'), name) |
