154359Sroberto# program to produce intewrnal time/frequence statistics from clockstats files
254359Sroberto#
354359Sroberto# usage: awk -f itf.awk clockstats
454359Sroberto#
554359Sroberto# format of input record
654359Sroberto# 49227 67.846 127.127.10.1 93:240:00:00:51.816 ITF
754359Sroberto# COCO 0 +2.0579E-07 -3.1037E-08 -7.7723E-11 +6.5455E-10 500.00 4.962819
854359Sroberto#
954359Sroberto# format of output record (time values in nanoseconds)
1054359Sroberto#  MJD      sec      time        freq
1154359Sroberto# 49227   67.846  +2.0579E-07  -7.7723E-11
1254359Sroberto#
1354359Sroberto# select ITF records with valid format
1454359Sroberto{
1554359Sroberto	if (NF >= 10 && $5 == "ITF") {
1654359Sroberto		printf "%5s %9.3f %7.1f %10.3e\n", $1, $2, $8 * 1e9, $10
1754359Sroberto	}
1854359Sroberto}
1954359Sroberto
20