Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from skyfield.api import load, EarthSatellite
- ts = load.timescale(builtin=True)
- conjunction = ts.utc(2021, 11, 25, 4, 18, [24 + 0.01*i for i in range(100)])
- line1 = '1 25544U 98067A 21328.19951010 .00003407 00000-0 70845-4 0 9994'
- line2 = '2 25544 51.6441 271.5215 0004374 235.8745 271.5482 15.48632762313390'
- iss = EarthSatellite(line1, line2, 'ISS (ZARYA)', ts)
- line1 = '1 44296U 19029BP 21327.89422035 .00005500 00000-0 11185-3 0 9993'
- line2 = '2 44296 52.9987 137.7304 0006980 336.4135 23.6550 15.47973186142593'
- deb = EarthSatellite(line1, line2, 'FALCON 9 DEB (44296)', ts)
- iss_pos = iss.at(conjunction)
- deb_pos = deb.at(conjunction)
- min_dist, time = min(zip((iss_pos - deb_pos).distance().km, conjunction))
- print(f"Minimum distance of {min_dist:.3f} km on {time.utc_strftime(format='%Y-%m-%d %H:%M:')}{time.utc.second:5.2f} UTC")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement