useCMG.c was modified to spit out difference between headings and file name
useCMG -test $1 -v | grep -v extracted | \ grep -v "working on" | sed -e 's/:/ /g' | awk '{printf("%.5f %.2f %.1f %s\n", $2+$3/24+$4/1440+$5/86400,$9-$14,$16, $17);}' | \ sed -e 's/-//' | awk '{if ($2 > 300) {print $1, 360 - $2, $3, $4} else {print $_} }' | sort -n >! junk.datBefore:
working on 000-002/0017_20070729_124930.merged extracted from 50 of 1178 2007 210 12:49:29 ping 0 GYRO 336.82 --- CMG 331.48 NEW_GYRO 335.42 SOG 3.31 000-002/0017_20070729_124930.merged 2007 210 12:49:31 ping 1 GYRO 336.35 --- CMG 331.48 NEW_GYRO 335.42 SOG 3.31 000-002/0017_20070729_124930.merged 2007 210 12:49:32 ping 2 GYRO 335.97 --- CMG 336.16 NEW_GYRO 335.42 SOG 13.02 000-002/0017_20070729_124930.merged 2007 210 12:49:34 ping 3 GYRO 335.68 --- CMG 335.87 NEW_GYRO 335.42 SOG 12.87 000-002/0017_20070729_124930.mergedAfter: (Decimal Julian Day, Delta Heading, Speed, Filename)
210.53436 1.40 3.3 000002/0017_20070729_124930.merged 210.53439 0.93 3.3 000002/0017_20070729_124930.merged 210.53440 0.55 13.0 000002/0017_20070729_124930.merged 210.53442 0.26 12.9 000002/0017_20070729_124930.merged
The plot config file for Gnuplot was built with mk_plot_load.conf
A sample plot config file is: plot_load.conf
The following lines set up the overall plot window:
set size 2,1 set origin 0,0 set multiplotAnd this is the setup for one of the plots:
set size 1,0.5 set origin 0,0.5 set grid set xlabel "Julian Day" set ylabel "Delta Heading" set title "Heading Analysis -- 0346_20070905_091736.merged" set key left box plot "junk.dat" using 1:2 index 0 title "Delta Heading (degrees)" with linesTo use the conf file pipe it to gnuplot:
cat plot_load.conf | gnuplotHere's one of the plots made this way:
As part of the initial do_check script, the output as seen above is also cat'd into a larger project .dat file.
The file plot_all-solutions.conf configures the gnuplotting of speed vs. delta heading, with a form of a 1/x function plotted on top. This function is just a crude approximation that is used as a cutoff for flagging problem data.
At 12 and 15 knots, the difference between course-made-good and the motion sensor's heading should not be 90 degrees, there's definitely a problem here. Also, the Amundsen doesn't meet Transport Canada's requirements for ludicrous speed, so 20+ knots ain't happenin.
Lastly, the modified 1/x function is used to flag data which is then cat'd into a new file (it must be touched before this command will work).
cat 015_mclintock_solutions_re-unravelled.dat | awk '{ if ($2-1 != 0.0 && $2 > 1.0 && $3 > 5) if ($3 > 100/($2-1)+0.75) \ print $1" "$2" "$3" "100/($2-1)+0.75" "$4}' >> 015_mclintock_solutions_re-unravelled_flagged.datThe output of this last step is (Decimal Julian Day, Delta Heading, Speed, Function Cutoff, filename):
286.02966 89.54 15.1 1.87943 015_Mclintock_reunravelled/0168_20071013_004242.merged 286.02968 89.73 15.1 1.87701 015_Mclintock_reunravelled/0168_20071013_004242.merged 286.02968 89.83 15.4 1.87575 015_Mclintock_reunravelled/0168_20071013_004242.merged 286.02969 90.20 15.7 1.87108 015_Mclintock_reunravelled/0168_20071013_004242.merged 286.02969 90.54 15.5 1.86682 015_Mclintock_reunravelled/0168_20071013_004242.merged