Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fdir = HOME+'programming/python/nofs/objectdb/satellites/'
- outdir = fdir + 'tmp/'
- fname = fdir + 'GEOs.tle'
- #fname = fdir + 'tonight.tle'
- if not os.path.exists(outdir):
- os.system('mkdir {:s}'.format(outdir))
- with open(fname) as fd:
- s = fd.read()
- if s[0] == '0':
- tlelist = s.split('\n0')
- else:
- tmp = s.split('\n')
- tlelist = []
- for k in range(0, len(tmp), 3):
- t = '\n'.join(tmp[k:k+3])
- t = '0 ' + t
- tlelist.append(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement