Skip to content

Instantly share code, notes, and snippets.

@kieranshanley
Last active July 20, 2022 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kieranshanley/00f80997e4d07501187461d9fc702e7a to your computer and use it in GitHub Desktop.
Save kieranshanley/00f80997e4d07501187461d9fc702e7a to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
from tletools import TLE
tle_string = """
ISS (ZARYA)
1 25544U 98067A 22201.40857775 .00008240 00000+0 15195-3 0 9997
2 25544 51.6419 172.0419 0005020 30.4744 71.6173 15.50043356350332
"""
tle_lines = tle_string.strip().splitlines()
tle = TLE.from_lines(*tle_lines)
orbit = tle.to_orbit()
print("TLE = ", tle_string)
print()
print("SMA = ", orbit.a)
print("ECC", orbit.ecc)
print("INC", orbit.inc)
print("RAAN", orbit.raan)
print("AOP", orbit.argp)
print("TA = ", orbit.nu)
print("Epoch = {}\n).format(orbit.epoch))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment