equal
deleted
inserted
replaced
1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # L I S T B I N S |
3 # L I S T B I N S |
4 # doc: Fri Aug 25 15:57:05 2006 |
4 # doc: Fri Aug 25 15:57:05 2006 |
5 # dlm: Mon Feb 29 18:10:25 2016 |
5 # dlm: Thu Mar 17 07:39:43 2016 |
6 # (c) 2006 A.M. Thurnherr |
6 # (c) 2006 A.M. Thurnherr |
7 # uE-Info: 59 63 NIL 0 0 72 10 2 4 NIL ofnI |
7 # uE-Info: 61 0 NIL 0 0 72 10 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: |
55 # - adapted to calculation of w12, w34 from earth-coordinate data |
55 # - adapted to calculation of w12, w34 from earth-coordinate data |
56 # - several other changes to the code that should not affect the results |
56 # - several other changes to the code that should not affect the results |
57 # Jan 6, 2016: - -b removed (always output beamvels) |
57 # Jan 6, 2016: - -b removed (always output beamvels) |
58 # Jan 31, 2016: - started debugging the obviously wrong Earth2Beam() transformation |
58 # Jan 31, 2016: - started debugging the obviously wrong Earth2Beam() transformation |
59 # Feb 29, 2016: - continued debugging; removed debugging code |
59 # Feb 29, 2016: - continued debugging; removed debugging code |
|
60 # Mar 17, 2016: - adapted to new Getopt library |
60 |
61 |
61 # General Notes: |
62 # General Notes: |
62 # - everything (e.g. beams) is numbered from 1 |
63 # - everything (e.g. beams) is numbered from 1 |
63 # - no support for BT data |
64 # - no support for BT data |
64 |
65 |
82 # at least when 3-beam solutions are allowed and when -p is used to |
83 # at least when 3-beam solutions are allowed and when -p is used to |
83 # edit the data |
84 # edit the data |
84 # - non-monotonic min_pcg is particularly obvious with the DYNAMUCK BM_ADCP |
85 # - non-monotonic min_pcg is particularly obvious with the DYNAMUCK BM_ADCP |
85 # data, where one of the beams performed much worse than the others |
86 # data, where one of the beams performed much worse than the others |
86 |
87 |
87 require "getopts.pl"; |
88 use Getopt::Std; |
88 |
89 |
89 $ADCP_tools_minVersion = 1.4; |
90 $ADCP_tools_minVersion = 1.4; |
90 ($ADCP_TOOLS) = ($0 =~ m{(.*/)[^/]+}); |
91 ($ADCP_TOOLS) = ($0 =~ m{(.*/)[^/]+}); |
91 require "$ADCP_TOOLS/ADCP_tools_lib.pl"; |
92 require "$ADCP_TOOLS/ADCP_tools_lib.pl"; |
92 |
93 |
97 "[-S)oundspeed correction <salin|*,temp|*,depth|*> " . |
98 "[-S)oundspeed correction <salin|*,temp|*,depth|*> " . |
98 "[-P)itch/Roll <bias/bias>] [-B)eamvel <bias/bias/bias/bias>] " . |
99 "[-P)itch/Roll <bias/bias>] [-B)eamvel <bias/bias/bias/bias>] " . |
99 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
100 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
100 "[-p)ct-good <min>] " . |
101 "[-p)ct-good <min>] " . |
101 "<RDI file>\n") |
102 "<RDI file>\n") |
102 unless (&Getopts("4aB:d:M:o:p:r:P:RS:") && @ARGV == 1); |
103 unless (&getopts("4aB:d:M:o:p:r:P:RS:") && @ARGV == 1); |
103 |
104 |
104 ($P{pitch_bias},$P{roll_bias}) = split('[,/]',$opt_P); |
105 ($P{pitch_bias},$P{roll_bias}) = split('[,/]',$opt_P); |
105 ($P{velbias_b1},$P{velbias_b2},$P{velbias_b3},$P{velbias_b4}) = split('[,/]',$opt_B); |
106 ($P{velbias_b1},$P{velbias_b2},$P{velbias_b3},$P{velbias_b4}) = split('[,/]',$opt_B); |
106 |
107 |
107 die("$0: -4 and -d are mutually exclusive\n") |
108 die("$0: -4 and -d are mutually exclusive\n") |