ensemble.awk revision 54359
154359Sroberto# program to produce loran ensemble statistics from clockstats files 254359Sroberto# 354359Sroberto# usage: awk -f ensemble.awk clockstats 454359Sroberto# 554359Sroberto# format of input record (time values in seconds) 654359Sroberto# 49165 8.628 127.127.10.1 93:178:00:00:07.241 LORAN ENSEMBLE 754359Sroberto# -6.43E-08 +5.02E-08 .091 +5.98E-08 +1.59E-08 .909 +4.85E-08 +3.52E-08 854359Sroberto# 954359Sroberto# format of output record (time values in nanoseconds) 1054359Sroberto# MJD sec GPS wgt LORAN wgt avg sigma 1154359Sroberto# 49165 8.628 -64.3 0.091 59.8 0.909 48.5 35.2 1254359Sroberto# 1354359Sroberto# select LORAN ENSEMBLE records with valid format and weights 1454359Sroberto{ 1554359Sroberto if (NF >= 14 && $6 == "ENSEMBLE" && $9 > 0 && $12 > 0) 1654359Sroberto printf "%5s %9.3f %7.1f %6.3f %7.1f %6.3f %7.1f %7.1f\n", $1, $2, $7*1e9, $9, $10*1e9, $12, $13*1e9, $14*1e9 1754359Sroberto} 18