Created
January 7, 2019 13:19
-
-
Save Maarrk/e2567d584ce3437e53ff4cceb4b8499d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# By Marek Łukasiewicz 2019 | |
filenames = ['GarminGoracy.txt', 'GarminZimny.txt', 'NovatelEgnos.txt', 'NovatelGoracy.txt', 'NovatelZimny.txt'] | |
for filename in filenames: | |
infile = open(filename, 'r') | |
out_gga = open('gga_' + filename, 'w') | |
out_gsa = open('gsa_' + filename, 'w') | |
for line in infile: | |
if line[:6] == '$GPGGA': | |
out_gga.write(line) | |
elif line[:6] == '$GPGSA': | |
out_gsa.write(line) | |
infile.close() | |
out_gga.close() | |
out_gsa.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment