equal
deleted
inserted
replaced
1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # B E A M S T A T S |
3 # B E A M S T A T S |
4 # doc: Fri Aug 25 15:57:05 2006 |
4 # doc: Fri Aug 25 15:57:05 2006 |
5 # dlm: Thu Mar 17 07:39:34 2016 |
5 # dlm: Thu May 19 10:24:48 2016 |
6 # (c) 2006 A.M. Thurnherr |
6 # (c) 2006 A.M. Thurnherr |
7 # uE-Info: 35 0 NIL 0 0 72 0 2 4 NIL ofnI |
7 # uE-Info: 254 0 NIL 0 0 72 0 2 4 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # Split data file into per-bin time series. |
10 # Split data file into per-bin time series. |
11 |
11 |
12 # HISTORY: |
12 # HISTORY: |
30 # BUG: min() did not work with 1st elt undef |
30 # BUG: min() did not work with 1st elt undef |
31 # Feb 21, 2008: - BUG: had forgotten to undo debugging changes |
31 # Feb 21, 2008: - BUG: had forgotten to undo debugging changes |
32 # - removed missing magdecl warning on -b |
32 # - removed missing magdecl warning on -b |
33 # Mar 4, 2014: - added support for missing PITCH/ROLL/HEADING |
33 # Mar 4, 2014: - added support for missing PITCH/ROLL/HEADING |
34 # Mar 17, 2016: - adapted to new Getopt library |
34 # Mar 17, 2016: - adapted to new Getopt library |
|
35 # May 19, 2016: - adapted to velBeamToEarth() |
35 |
36 |
36 # General Notes: |
37 # General Notes: |
37 # - everything (e.g. beams) is numbered from 1 |
38 # - everything (e.g. beams) is numbered from 1 |
38 # - no support for BT data |
39 # - no support for BT data |
39 |
40 |
246 if ($dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b][$i] < $opt_p) { |
247 if ($dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b][$i] < $opt_p) { |
247 undef($dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b][$i]); |
248 undef($dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b][$i]); |
248 undef($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][$i]); |
249 undef($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][$i]); |
249 } |
250 } |
250 } |
251 } |
251 @{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]} = $beamCoords |
252 @{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]} = |
252 ? velInstrumentToEarth(\%dta,$e, |
253 $beamCoords ? velBeamToEarth(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]}) |
253 velBeamToInstrument(\%dta,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]}) |
254 : velApplyHdgBias(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]}) |
254 ) |
|
255 : velApplyHdgBias(\%dta,$e,@{$dta{ENSEMBLE}[$e]->{VELOCITY}[$b]}) |
|
256 unless ($opt_b); |
255 unless ($opt_b); |
257 unless (defined($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][0])) { |
256 unless (defined($dta{ENSEMBLE}[$e]->{VELOCITY}[$b][0])) { |
258 undef(@{$dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b]}); |
257 undef(@{$dta{ENSEMBLE}[$e]->{PERCENT_GOOD}[$b]}); |
259 next; |
258 next; |
260 } |
259 } |