author | A.M. Thurnherr <athurnherr@yahoo.com> |
Mon, 20 Apr 2020 15:48:52 -0400 | |
changeset 53 | 51c5988a7f1f |
parent 52 | 5b07a9b89aee |
child 61 | 69192495f0db |
permissions | -rwxr-xr-x |
40 | 1 |
#!/usr/bin/perl |
2 |
#====================================================================== |
|
3 |
# P A T C H P D 0 |
|
4 |
# doc: Tue Aug 23 20:00:15 2016 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
5 |
# dlm: Tue Apr 14 21:28:49 2020 |
40 | 6 |
# (c) 2010 A.M. Thurnherr |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
7 |
# uE-Info: 103 26 NIL 0 0 72 2 2 4 NIL ofnI |
40 | 8 |
#====================================================================== |
9 |
||
10 |
$antsSummary = 'patch TRDI PD0 file with external attitude data'; |
|
11 |
||
12 |
# History: |
|
13 |
# Aug 23, 2016: - exported from IMP+LADCP |
|
14 |
# Aug 25, 2016: - completed basic structure |
|
15 |
# Nov 20, 2017: - major code cleanup |
|
16 |
# - added -d) to keep original data source id |
|
42 | 17 |
# Dec 9, 2017: - added $antsSuppressCommonOptions = 1; |
18 |
# Dec 23, 2017: - added support for -c |
|
19 |
# - BUG: not backward compatible with old IMP files any more |
|
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
20 |
# Jun 13, 2017: - added pitch and roll to -o |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
21 |
# - BUG: ??? does -o handle pitch and roll ANOMALIES correctly? |
50 | 22 |
# Jun 30, 2019: - -o did not work with single argument |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
23 |
# Apr 14, 2020: - adapted to use for moored ADCP data as well |
40 | 24 |
|
25 |
# PATCH-FILE REQUIREMENTS (ANTS format) |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
26 |
# - %[L]ADCP_pitch.mu %[L]ADCP_roll.mu mean ADCP pitch and roll |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
27 |
# - %IM[UP]_hdg_offset heading offset of external IMU |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
28 |
# - [L]ADCP_ens ADCP ensemble number |
40 | 29 |
# - pitch, roll external pitch/roll *anomalies* |
30 |
# - hdg external heading rotated into ADCP coord system |
|
31 |
||
32 |
# PATCHED PD0 FILE: |
|
33 |
# |
|
34 |
# - pitch = RDI_pitch(mean_LADCP_gimbal_pitch + rotated_external_pitch_anomaly) |
|
35 |
# - roll = mean_LADCP_roll + rotated_external_roll_anomaly |
|
36 |
# - hdg = external_hdg - heading_offset |
|
37 |
# |
|
38 |
# - unless -d is used, every patched ensemble has set the DATA_SOURCE_ID as follows; |
|
39 |
# PROCESSING SOFTWARE NEEDS TO BE ABLE TO DEAL WITH DSID values != 0x7F |
|
40 |
# 0xA0 no values patched |
|
41 |
# 0xA1 heading patched |
|
42 |
# 0xA2 roll patched |
|
43 |
# 0xA3 roll & heading patched |
|
44 |
# 0xA4 pitch patched |
|
45 |
# 0xA5 pitch & heading patched |
|
46 |
# 0xA6 pitch & roll patched |
|
47 |
# 0xA7 pitch, roll & heading patched |
|
48 |
# |
|
49 |
# - additionally, all velocities from ensembles with missing pitch/roll/heading |
|
50 |
# values are removed unless -k is set |
|
51 |
||
52 |
($ANTS) = (`which ANTSlib` =~ m{^(.*)/[^/]*$}); |
|
53 |
($ADCP_TOOLS) = ($0 =~ m{^(.*)/[^/]*$}); |
|
54 |
||
42 | 55 |
$antsMinLibVersion = 7.0; |
56 |
$ADCP_tools_minVersion = 2.1; |
|
40 | 57 |
|
58 |
require "$ANTS/ants.pl"; |
|
59 |
require "$ANTS/libvec.pl"; |
|
60 |
require "$ANTS/libstats.pl"; |
|
61 |
require "$ADCP_TOOLS/ADCP_tools_lib.pl"; |
|
62 |
||
63 |
$antsParseHeader = 0; |
|
42 | 64 |
$antsSuppressCommonOptions = 1; |
65 |
&antsUsage('cdhko:pr',2, |
|
40 | 66 |
'[patch -p)itch] [-r)oll] [-h)eading] (none patches all)', |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
67 |
'[patch -c)lock with pre-Y2K RTC values]', |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
68 |
'[-o) <[pitch,roll,]heading-offset>] [-k)eep velocities of unpatched ensembles]', |
40 | 69 |
'[keep original -d)ata-source id]', |
70 |
'<original PD0 file> <patched PD0 file> [external attitude file]'); |
|
71 |
||
72 |
$opt_p = $opt_r = $opt_h = 1 |
|
73 |
unless ($opt_p || $opt_r || $opt_h); |
|
74 |
||
42 | 75 |
$RDI_PD0_IO::OVERRIDE_Y2K_CLOCK = $opt_c; |
76 |
||
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
77 |
$ADCP_file = &antsFileArg(); |
40 | 78 |
$outPD0 = $ARGV[0]; shift; |
79 |
||
80 |
#---------------------------------------------------------------------- |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
81 |
# Step 1: Read ADCP Data |
40 | 82 |
#---------------------------------------------------------------------- |
83 |
||
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
84 |
readData($ADCP_file,\%ADCP); # TRDI PD0 file |
40 | 85 |
|
86 |
#---------------------------------------------------------------------- |
|
87 |
# Step 2: Process External Attidue Input to Patch PD0 file |
|
88 |
#---------------------------------------------------------------------- |
|
89 |
||
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
90 |
&antsIn(); # load first IMP record |
40 | 91 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
92 |
my($ensF) = &fnrNoErr('ADCP_ens'); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
93 |
$ensF = &fnr('LADCP_ens') unless defined($ensF); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
94 |
|
40 | 95 |
my($pitchF) = &fnr('pitch'); |
96 |
my($rollF) = &fnr('roll'); |
|
97 |
my($hdgF) = &fnr('hdg'); |
|
98 |
||
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
99 |
my($ADCP_pitch_mean) = $P{'ADCP_pitch.mu'}; |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
100 |
$ADCP_pitch_mean = &antsRequireParam('LADCP_pitch.mu') |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
101 |
unless numberp($ADCP_pitch_mean); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
102 |
|
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
103 |
my($ADCP_roll_mean) = $P{'ADCP_roll.mu'}; |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
104 |
$ADCP_roll_mean = &antsRequireParam('LADCP_roll.mu') |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
105 |
unless numberp($ADCP_roll_mean); |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
106 |
|
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
107 |
my($pofs,$rofs) = (0,0); # apply externally supplied offset(s) |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
108 |
my($rho,$crho,$srho); |
40 | 109 |
if (defined($opt_o)) { |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
110 |
my($pofs,$rofs,$hofs) = split(/,/,$opt_o); |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
111 |
|
50 | 112 |
if (defined($rofs)) { # pitch and roll offsets supplied |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
113 |
croak("$0: cannot decode -o $opt_o\n") |
50 | 114 |
unless numbersp($pofs,$rofs,$hofs); |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
115 |
} else { # no pitch and roll, only heading |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
116 |
$hofs = $pofs; |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
117 |
$pofs = undef; |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
118 |
} |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
119 |
croak("$0: cannot decode -o $opt_o\n") |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
120 |
unless numberp($hofs); |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
121 |
# set up heading correction |
42 | 122 |
&antsAddParams('IMU_hdg_offset',$P{IMP_hdg_offset}) # backward compatibility |
123 |
if defined($P{IMP_hdg_offset}); |
|
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
124 |
$rho = $hofs - &antsRequireParam('IMU_hdg_offset'); # calculate correction relative to already applied one |
40 | 125 |
$crho = cos(rad($rho)); |
126 |
$srho = sin(rad($rho)); |
|
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
127 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
128 |
if (defined($pofs)) { # rotate IMP pitch and roll offsets into new ADCP frame |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
129 |
my($IMP_pitch_mean) = &antsRequireParam('IMP_pitch.mu') * $crho |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
130 |
+ &antsRequireParam('IMP_roll.mu') * $srho; |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
131 |
my($IMP_roll_mean) = -&antsRequireParam('IMP_pitch.mu') * $srho |
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
132 |
+ &antsRequireParam('IMP_roll.mu') * $crho; |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
133 |
$ADCP_pitch_mean = $IMP_pitch_mean - $pofs; # apply externally supplied offsets |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
134 |
$ADCP_roll_mean = $IMP_roll_mean - $rofs; |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
135 |
} |
40 | 136 |
} |
137 |
||
50 | 138 |
my($pr_missing,$hdg_missing) = (0,0); |
139 |
my($missing_pr_block_len,$missing_hdg_block_len); |
|
140 |
||
40 | 141 |
do { |
50 | 142 |
my($ADCP_deployed); |
40 | 143 |
my($ens) = $P{RECNO}; |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
144 |
die("assertion failed [$ants_[0][$ensF] != $ADCP{ENSEMBLE}[$ens]->{NUMBER} --- 1-$ADCP{ENSEMBLE}[0]->{NUMBER} + $P{RECNO} + $d]") |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
145 |
unless ($ants_[0][$ensF] == $ADCP{ENSEMBLE}[$ens]->{NUMBER}); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
146 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID} = 0xA0; |
40 | 147 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
148 |
if (numbersp($ants_[0][$pitchF],$ants_[0][$rollF])) { # valid IMP data -> patch ADCP ensemble |
50 | 149 |
$ADCP_deployed = 1; |
150 |
$missing_pr_block_len = 0; |
|
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
151 |
if (defined($opt_o)) { # -o set: rotate pitch and roll into correct coordinates |
40 | 152 |
my($rot_p) = ($ants_[$r][$pitchF] * $crho + |
153 |
$ants_[$r][$rollF] * $srho); |
|
154 |
my($rot_r) = (-$ants_[$r][$pitchF] * $srho + |
|
155 |
$ants_[$r][$rollF] * $crho); |
|
156 |
$ants_[$r][$pitchF] = $rot_p; |
|
157 |
$ants_[$r][$rollF] = $rot_r; |
|
158 |
} |
|
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
159 |
if ($opt_p) { # patch pitch |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
160 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID} |= ($opt_p<<2); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
161 |
$ADCP{ENSEMBLE}[$ens]->{PITCH} = RDI_pitch($ADCP_pitch_mean + $ants_[0][$pitchF], |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
162 |
$ADCP_roll_mean + $ants_[0][$rollF]); |
40 | 163 |
} |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
164 |
if ($opt_r) { # patch roll |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
165 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID} |= ($opt_r<<1); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
166 |
$ADCP{ENSEMBLE}[$ens]->{ROLL} = $ADCP_roll_mean + $ants_[0][$rollF]; |
40 | 167 |
} |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
168 |
} else { # no valid IMP pitch and roll => invalidate ADCP data |
50 | 169 |
$pr_missing++ if $ADCP_deployed; # don't count missing before deployment |
170 |
$missing_pr_block_len++; |
|
40 | 171 |
unless ($opt_k) { |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
172 |
clearEns(\%ADCP,$ens); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
173 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID}= 0xA0; |
40 | 174 |
} |
175 |
} |
|
176 |
||
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
177 |
if (numberp($ants_[0][$hdgF])) { # valid IMP heading |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
178 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID} |= $opt_h; |
50 | 179 |
$missing_hdg_block_len = 0; |
43
b63fa355644c
commit to merge with changes from EN620
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
42
diff
changeset
|
180 |
if (defined($opt_o)) { # apply offset on -o; otherwise, data are correctly rotated |
40 | 181 |
$ants_[0][$hdgF] -= $rho; |
182 |
$ants_[0][$hdgF] += 360 if ($ants_[0][$hdgF] < 0); |
|
183 |
} |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
184 |
$ADCP{ENSEMBLE}[$ens]->{HEADING} = $ants_[0][$hdgF] # patch heading |
40 | 185 |
if $opt_h; |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
186 |
} else { # no valid IMP heading => invalidate ADCP data |
50 | 187 |
$hdg_missing++ if $ADCP_deployed; |
188 |
$missing_hdg_block_len++; |
|
40 | 189 |
unless ($opt_k) { |
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
190 |
clearEns(\%ADCP,$ens); |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
191 |
$ADCP{ENSEMBLE}[$ens]->{DATA_SOURCE_ID}= 0xA0; |
40 | 192 |
} |
193 |
} |
|
194 |
} while (&antsIn()); |
|
50 | 195 |
$pr_missing -= missing_pr_block_len; # don't count final block (post recovery) |
196 |
$hdg_missing -= missing_hdg_block_len; |
|
40 | 197 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
198 |
$ADCP{ENSEMBLE}[0]->{DATA_SOURCE_ID} = 0x7F; # ensure correct DSID (1st ens: orig; 2nd ens: this prog) |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
199 |
$ADCP{ENSEMBLE}[1]->{DATA_SOURCE_ID} = 0xA0 |
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
200 |
unless ($ADCP{ENSEMBLE}[1]->{DATA_SOURCE_ID}&0xF0 == 0xA0); |
40 | 201 |
|
52
5b07a9b89aee
- adapted to work with IMPed moored ADCP data
Andreas Thurnherr <ant@ldeo.columbia.edu>
parents:
50
diff
changeset
|
202 |
writeData($outPD0,\%ADCP); # write new PD0 |
40 | 203 |
|
204 |
my($verb) = $opt_k ? 'retained' : 'cleared'; |
|
205 |
printf(STDERR "$outPD0: %d pitch/roll & %d heading values $verb\n",$pr_missing,$hdg_missing) |
|
206 |
if ($pr_missing+$hdg_missing); |
|
207 |
||
208 |
exit(0); |
|
209 |