SHARE
TWEET

test

murison Sep 22nd, 2018 (edited) 105 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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top