Skip to content

Instantly share code, notes, and snippets.

@Maarrk
Created January 7, 2019 13:19
Show Gist options
  • Save Maarrk/e2567d584ce3437e53ff4cceb4b8499d to your computer and use it in GitHub Desktop.
Save Maarrk/e2567d584ce3437e53ff4cceb4b8499d to your computer and use it in GitHub Desktop.
#!/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