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: Tue Mar 4 13:09:14 2014 |
5 # dlm: Thu Mar 17 07:39:34 2016 |
6 # (c) 2006 A.M. Thurnherr |
6 # (c) 2006 A.M. Thurnherr |
7 # uE-Info: 33 64 NIL 0 0 72 0 2 4 NIL ofnI |
7 # uE-Info: 35 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: |
29 # Feb 19, 2008: - BUG: division by zero |
29 # Feb 19, 2008: - BUG: division by zero |
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 |
35 |
35 # General Notes: |
36 # General Notes: |
36 # - everything (e.g. beams) is numbered from 1 |
37 # - everything (e.g. beams) is numbered from 1 |
37 # - no support for BT data |
38 # - no support for BT data |
38 |
39 |
49 # at least when 3-beam solutions are allowed and when -p is used to |
50 # at least when 3-beam solutions are allowed and when -p is used to |
50 # edit the data |
51 # edit the data |
51 # - non-monotonic min_pcg is particularly obvious with the DYNAMUCK BM_ADCP |
52 # - non-monotonic min_pcg is particularly obvious with the DYNAMUCK BM_ADCP |
52 # data, where one of the beams performed much worse than the others |
53 # data, where one of the beams performed much worse than the others |
53 |
54 |
54 require "getopts.pl"; |
55 use Getopt::Std; |
55 $0 =~ m{(.*/)[^/]+}; |
56 $0 =~ m{(.*/)[^/]+}; |
56 require "$1RDI_BB_Read.pl"; |
57 require "$1RDI_BB_Read.pl"; |
57 require "$1RDI_Coords.pl"; |
58 require "$1RDI_Coords.pl"; |
58 require "$1RDI_Utils.pl"; |
59 require "$1RDI_Utils.pl"; |
59 |
60 |
64 "[-S)oundspeed correction <salin|*,temp|*,depth|*> " . |
65 "[-S)oundspeed correction <salin|*,temp|*,depth|*> " . |
65 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
66 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
66 "[-%)good <min>] " . |
67 "[-%)good <min>] " . |
67 "[output -b)eam coordinates] " . |
68 "[output -b)eam coordinates] " . |
68 "<RDI file>\n") |
69 "<RDI file>\n") |
69 unless (&Getopts("4abd:f:M:p:r:S:") && @ARGV == 1); |
70 unless (&getopts("4abd:f:M:p:r:S:") && @ARGV == 1); |
70 |
71 |
71 die("$0: -4 and -d are mutually exclusive\n") |
72 die("$0: -4 and -d are mutually exclusive\n") |
72 if ($opt_4 && defined($opt_d)); |
73 if ($opt_4 && defined($opt_d)); |
73 |
74 |
74 die("$0: -p and -b are mutually exclusive\n") |
75 die("$0: -p and -b are mutually exclusive\n") |