# Print start/top times of gaps in 1 Hz GPS data. # First column of input is epoch seconds. BEGIN { minGapSec = 120; printf "# GPS gaps exceeding %d seconds\n", minGapSec; } prevTime > 0 { delta = $1 - prevTime; if (delta > minGapSec) { if (delta > (3600 * 24)) { prevTime = 0; next; # Ignore gaps exceeding one day } cmd = "et2ut " prevTime; cmd | getline prevUTC; close(cmd); cmd = "et2ut " $1; cmd | getline UTC; close(cmd); printf "%d %d %d - %s, %s\n", prevTime, $1, delta, prevUTC, UTC; } } { prevTime = $1; }