brandon-rhodes / python-sgp4

Python version of the SGP4 satellite position library
MIT License
376 stars 88 forks source link

Alpha5 implementation breaks TLEs with spaces instead of leading zeros in satnum #81

Closed RazerM closed 3 years ago

RazerM commented 3 years ago

Example:

>>> from sgp4.earth_gravity import wgs84
>>> from sgp4.io import twoline2rv
>>> line1 = '1  4859U 21001A   21007.63955392  .00000000  00000+0  00000+0 0  9990'
>>> line2 = '2  4859 000.0000 000.0000 0000000 000.0000 000.0000 01.00000000    09'
>>> s = twoline2rv(line1, line2, wgs84)
>>> s.satnum
-225141
brandon-rhodes commented 3 years ago

Thanks so much for a complete working example, it made it easy for me to add a test case and then a fix. I'll plan for a release within the next few days to get this update out!

RazerM commented 3 years ago

Thanks!