2009-002-FA: <http://woodshole.er.usgs.gov/operations/ia/public_ds_info.php?fa=2009-002-FA>
2010-004-FA: <http://woodshole.er.usgs.gov/operations/ia/public_ds_info.php?fa=2010-004-FA>
2011-004-FA: <http://woodshole.er.usgs.gov/operations/ia/public_ds_info.php?fa=2011-004-FA>
During the initial loop through the script: 1) Easting and northing coordinates (UTM Zone 19, WGS84) for the first five traces of input navigation were read and easting and northing differentials between the consecutive positions were calculated; 2) The signs (+/-) of the differential values were compared to a look-up table to determine the appropriate conversion of the arc tangent (atan2(dy,dx)) angle between consecutive positions to a polar azimuth; 3) The average of the polar azimuths was calculated; 4) The sine and cosine of the average azimuth was calculated and multiplied by the linear distance between the catamaran and the shipboard DGPS receiver (31 or 37 m during 2010-004-FA and 51.5 m during 2011-004-FA), providing absolute values for easting and northing offsets, respectively; 5) A look-up table was used to determine the quadrant of the average azimuth and appropriately add or subtract the calculated offsets to the easting and northing coordinates of the first three input traces, producing final layback positions for those traces; 6) Layback and original easting and northing coordinates for the three adjusted traces were printed to a new layback navigation file that also retained additional attributes input records; and 7) Easting and northing coordinates of the fourth and fifth traces, the three azimuths computed between traces two, three, four, and five, and the average azimuth were held as input for calculations conducted in the subsequent loop.
During subsequent loops through the script: 1) Easting and northing coordinates for three additional traces from input navigation were read, and easting and northing differentials were calculated between the consecutive positions, including the last trace position held from the previous loop; 2) Three new polar azimuths were calculated using the differential values, then a new average azimuth was calculated from the three that were held, the new three, and the average held from the previous loop (the previously calculated average was factored into the new average to smooth "kinks" along the layback navigation that can result from significantly different average azimuths calculated from one loop to the next); 3) New layback offset values were computed, and applied to the easting and northing coordinates of the last two traces input during the previous loop, and the first trace input during the present loop. 4) Layback and original easting and northing coordinates for the three adjusted traces were appended to the layback navigation file started in the previous loop; and 5) Easting and northing coordinates of the second and third traces, the three new azimuths, and the average azimuth from the present loop were held as input for calculations conducted in the subsequent loop.
Near the end of the input navigation file: 1) If less than three traces were present during a new loop, the layback offsets calculated during the previous loop were applied to remaining trace coordinates; 2) Layback and original easting and northing coordinates for the remaining adjusted traces were appended to the layback navigation file; and 3) The script reached its end, closed, and saved the layback navigation file.
In this fashion, the script approximated a moving window, in which the average of six trace to trace azimuths was used to calculate layback offsets for three central trace positions. Exceptions were at the start of a file, where the first three input trace positions were adjusted using offsets calculated from the average of only four azimuths, and possibly at the end of a file, where remaining traces may have been adjusted using the offsets calculated during the previous loop.