HOW TO analyse a corrupt G1 file:
set YYMMDD=140304
set YMD = ( 2014 03 04 )
If you have files saved before a break of the UIPC/DAC3 in
RAW_o054/saved/$YYMMDD
and files after in
RAW_o054/doubt/$YYMMDD
then:
rm -f doubt/$YYMMDD/miss.press.lst doubt/$YYMMDD/miss.grav.lst
doubt/$YYMMDD/miss.date.lst
touch doubt/$YYMMDD/miss.press.lst doubt/$YYMMDD/miss.grav.lst
doubt/$YYMMDD/miss.date.lst
foreach f ( */$YYMMDD/G1* )
awk '($9 ~ "9999.9" ){print
FILENAME,"::",NR,"::",$0}'
$f >> doubt/$YYMMDD/miss.press.lst
awk '($7 == "9999.9990000" ){print
FILENAME,"::",NR,"::",$0}' $f >> doubt/$YYMMDD/miss.grav.lst
awk '($1 == "0001" ){print
FILENAME"::",NR,"::",$0}'
$f >> doubt/$YYMMDD/miss.date.lst
end
Undetermined dates have a year 0001
You can check the position of the records of that day converted to
seconds by
awk '/\[DATA\]/{print NR}' G1$YYMMDD.054
47
fgrep $YYMMDD doubt/$YYMMDD/miss.date.lst D
Note the line numbers (e.g. 37703) and
jdc.x -DSf15.5 -k3 $YMD `calc 37703-47`.0
(Note the trailing .0 !)
Another tool: ~/TD/checktime.in.raw
h[hgs]~/TD/RAW_o054> ../checktime-in-raw -c 1
doubt/140304/G1140304.054
%
% File doubt/140304/G1140304.054
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beg 00001 :: ................... :: 2014 03 04 00 00
00 -0.2062183
Brk 37656 :: 2014 03 04 10 27 34 :: 0001 01 01 01 01
01 9999.9990000
Dup 37657 :: 0001 01 01 01 01
01
9999.9990000
Brk 37681 :: 0001 01 01 01 01 01 :: 2014 03 04 15 12
50 9999.9990000
Brk 37689 :: 2014 03 04 11 05 59 :: 2014 02 27 11 06
00 -0.6187467
Brk 37694 :: 2014 02
27 11 06 04 :: 0001 01 01 01 01
01 9999.9990000
Dup 37695 :: 0001 01 01 01 01
01
9999.9990000
Brk 37735 :: 0001 01 01 01 01 01 :: 2014
02 27 09 50 46 9999.9990000
End 37748 :: 2014 02
27 09 50 59 ::
................... 9999.9990000
Sum n. of gap records: 64
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done %
h[hgs]~/TD/RAW_o054> ../checktime-in-raw -c 3
doubt/140304/G1140304.054
%
% File doubt/140304/G1140304.054
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beg 00001 :: ................... :: 2014 03 04 00 00
00 1001.5590000
Brk 37656 :: 2014 03 04 10 27 34 :: 0001 01 01 01 01
01 9999.9990000
Dup 37657 :: 0001 01 01 01 01
01
9999.9990
Brk 37681 :: 0001 01 01 01 01 01 :: 2014 03 04 15 12
50 9999.9990000
Brk 37689 :: 2014 03 04 11 05 59 :: 2014 02 27 11 06 00
1014.5070000
Brk 37694 :: 2014 02
27 11 06 04 :: 0001 01 01 01 01
01 9999.9990000
Dup 37695 :: 0001 01 01 01 01
01
9999.9990
Brk 37735 :: 0001 01 01 01 01 01 :: 2014 02 27 09 50 46
1016.5850000
End 37748 :: 2014 02
27 09 50 59 ::
................... 1016.6090000
Sum n. of gap records: 64
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done %
Note the severely deformed dates. There is very little information
to be salvaged.
Check that other files were not affected:
cd doubt/$YYMMDD
~/TD/checktime-in-raw -c 1 G1140305.054
%
% File G1140305.054
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beg 00001 :: ................... :: 2014 03 05 09 51 00
9999.9990000
Brk 00015 ::
2014 03 05 09 51 13 :: 0001 01 01 01 01
01 9999.9990000
Dup 00016 :: 0001 01 01 01 01
01
Brk 00027 :: 0001 01 01 01 01 01 :: 2014 03 05 09 49
26 9999.9990000
End 50903 :: 2014 03 05 23 59 59 ::
................... -0.3861850
Sum n. of gap records: 11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done %
The few misplaced records, lacking gravity (but
barometer), and the undated records could be removed.
In the case of a sound day, the output reads
%
% File G1140303.054
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Beg 00001 :: ................... :: 2014 03 03 00 00
00 0.0333170
End 86400 :: 2014 03 03 23 59 59 ::
................... -0.1870886
Sum n. of gap records: 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Done %
.bye