AWK script "awkhold": BEGIN { FS = "," } { FS = "," ARGC = 2 depth = -9999 temp = -9999 if ($1=="$GPRMC") { utctime = $2 latdeg = substr($4,1,2) latmin = substr($4,3,6) declat = latdeg + (latmin/60) londeg = substr($6,1,3) lonmin = substr($6,4,6) declon = -1 * (londeg + (lonmin/60)) if (NR==1) { holddepth = -9999 holdtemp = -9999 } else { printf("%s, %9.6f, %9.6f, %5.1f, %5.1f, %s\n", holdutctime, holddeclon, holddeclat, holddepth, holdtemp, ARGV[2]) } holdutctime = utctime holddeclon = declon holddeclat = declat holddepth = -9999 holdtemp = -9999 } if ($1=="$SDDPT") { depthreal = $2 holddepth = depthreal } if ($1=="$SDMTW") { tempreal = $2 holdtemp = tempreal } } END { printf("%s, %9.6f, %9.6f, %5.1f, %5.1f, %s\n", holdutctime, holddeclon, holddeclat, holddepth, holdtemp, ARGV[2]) }This AWK script was initialized by "dogps" - shell script run under CYGWIN v. 1.5.1 (UNIX like environment that runs under Windows). This is the script used for the May 15 data collection:
files=`ls *.gps | cut -d. -f1` for file in $files do awk -f awkhold $file.gps $file >> day4gps_mod.txt doneThe script not only parses the GPS navigation, but concatenates the results into a single file. This script was repeated for day 5 and day 6 (May 16 and May 17 respectively) with the output directed to day5gps.txt and day6gps.txt. Day 4 required the "mod" modifier due to some bad bathymetry values that needed to be edited prior to processing. The two files requiring this modificaiton were L54F2 and L55F1. These had anomalously deep values in areas of very shallow water. So the deep values were replaced with values more indicative of the area. No data values were modified.