Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

corrected handling of mean motion and orbitnumber fields in tlefiles.py

  • Loading branch information...
commit c4ebb82481e0cdebb4bc2ef8d1aa3412c4e3aa68 1 parent 5c0fa6a
Esben S. Nielsen authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 pyorbital/tlefile.py
View
5 pyorbital/tlefile.py
@@ -97,7 +97,10 @@ def _read_tle_decimal(rep):
self.arg_perigee = float(lines[14])
self.mean_anomaly = float(lines[15])
self.mean_motion = float(lines[16][:11])
- self.orbit = int(lines[16][11:-1])
+ if len(lines) == 17:
+ self.orbit = int(lines[16][11:-1])
+ else:
+ self.orbit = int(lines[17][:-1])
def __str__(self):
import pprint, StringIO
Please sign in to comment.
Something went wrong with that request. Please try again.