Advertisement
murison

test

Sep 22nd, 2018
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fdir = HOME+'programming/python/nofs/objectdb/satellites/'
  2. outdir = fdir + 'tmp/'
  3. fname = fdir + 'GEOs.tle'
  4. #fname = fdir + 'tonight.tle'
  5. if not os.path.exists(outdir):
  6.     os.system('mkdir {:s}'.format(outdir))
  7. with open(fname) as fd:
  8.     s = fd.read()
  9. if s[0] == '0':
  10.     tlelist = s.split('\n0')
  11. else:
  12.     tmp = s.split('\n')
  13.     tlelist = []
  14.     for k in range(0, len(tmp), 3):
  15.         t = '\n'.join(tmp[k:k+3])
  16.         t = '0 ' + t
  17.         tlelist.append(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement