The first step is to check the navigation recorded in the *.gps file for each line of acquisition. At first glance, 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.. (* refers to the line name, which for this day are L20F1, L21f1, L22F1, L23F1, L24F1, L25F1, L25F2, L26F1).
AWK script "awkhold":
BEGIN {
FS = ","
}
{
FS = ","
ARGC = 2
depth = -9999
temp = -9999
if ($1=="$GPRMC")
{
utctime = $2
date = $10
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("%9.6f, %9.6f, %s, %s, %5.1f, %5.1f, %s\n", holddeclon, holddeclat, holdutctime, holddate, holddepth, holdtemp, ARGV[2])
}
holdutctime = substr(utctime,1,2)":"substr(utctime,3,2)":"substr(utctime,5,2)
holddate = date
holddeclon = declon
holddeclat = declat
holddepth = -9999
holdtemp = -9999
}
if ($1=="$SDDPT")
{
depthreal = $2
holddepth = depthreal
}
if ($1=="$SDMTW")
{
tempreal = $2
holdtemp = tempreal
}
}
END {
printf("%9.6f, %9.6f, %s, %s, %5.1f, %5.1f, %s\n", holddeclon, holddeclat, holdutctime, holddate, holddepth, holdtemp, ARGV[2])
}
This AWK script was initialized by "doawk" - shell script run under CYGWIN (UNIX like environment that runs under Windows):
files=`ls *.gps | cut -d. -f1`
for file in $files
do
awk -f awkhold $file.gps $file >> resnav_jd251.txt
done