The first step is to check the navigation recorded in the *.gps file for each line of acquisition. At first glance, the navigation data in the files seem fine so I ran an AWK script which extracts the navigation, bathymetry, and temperature information recorded in each individual GPS data file. (I refers to the line name, which for this day are L37F1, L38F1, L39F1, L39F2, L40F1, L41F1, L42F1, L43F1, L44F1, L45F1, L46F1, L47F1, L48F1, L49F1, L49F2, L50F1, L51F1, L52F1, L53F1, L54F1, L54F2, L55F1, L55F2, L56F1, L57F1, L58F1, l58F2, L59F1, L60F1, L61F1, L62F1, L63F1, L64F1, L65F1, L66F1, L67F1, L68F1, L69F1, L70F1, L71F1, L72F1, L73F1, L74F1, L75F1. The awk script from May 16th that was able to handle all problems was used on this day's data.
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 "dohold" - shell script run under CYGWIN (UNIX like environment that runs under Windows):
files=`ls *.gps | cut -d. -f1 | tr "[A-Z"] ["a-z"]`
for file in $files
do
awk -f awkhold $file.gps $file > $file.holds
done