1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # E D I T P D 0 |
3 # E D I T P D 0 |
4 # doc: Mon Nov 25 20:24:31 2013 |
4 # doc: Mon Nov 25 20:24:31 2013 |
5 # dlm: Thu Jul 27 18:30:16 2017 |
5 # dlm: Wed Dec 6 09:38:33 2017 |
6 # (c) 2013 A.M. Thurnherr |
6 # (c) 2013 A.M. Thurnherr |
7 # uE-Info: 122 0 NIL 0 0 72 2 2 4 NIL ofnI |
7 # uE-Info: 89 37 NIL 0 0 72 2 2 4 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # edit RDI PD0 file, e.g. to replace pitch/roll/heading with external values |
10 # edit RDI PD0 file, e.g. to replace pitch/roll/heading with external values |
11 |
11 |
12 # NOTES: |
12 # NOTES: |
73 # - added %-good to beam2earth and earth2beam |
73 # - added %-good to beam2earth and earth2beam |
74 # - made single-ping ensemble requirement for most routines |
74 # - made single-ping ensemble requirement for most routines |
75 # Jul 12, 2016: - updated ensure_{DL,UL} routines |
75 # Jul 12, 2016: - updated ensure_{DL,UL} routines |
76 # Nov 15, 2016: - BUG: ensure_{DL,UL} routines did not negate heading data |
76 # Nov 15, 2016: - BUG: ensure_{DL,UL} routines did not negate heading data |
77 # Jul 27, 2017: - began working on dealias() |
77 # Jul 27, 2017: - began working on dealias() |
|
78 # Dec 6, 2017: - cosmetics |
78 |
79 |
79 use Getopt::Std; |
80 use Getopt::Std; |
80 |
81 |
81 ($ADCP_TOOLS) = ($0 =~ m{(.*/)[^/]+}); |
82 ($ADCP_TOOLS) = ($0 =~ m{(.*/)[^/]+}); |
82 $ADCP_tools_minVersion = 1.4; |
83 $ADCP_tools_minVersion = 1.4; |
83 require "$ADCP_TOOLS/ADCP_tools_lib.pl"; |
84 require "$ADCP_TOOLS/ADCP_tools_lib.pl"; |
84 |
85 |
85 $USAGE = "$0 @ARGV"; |
86 $USAGE = "$0 @ARGV"; |
86 die("Usage: $0 " . |
87 die("Usage: $0 " . |
87 '-e) <edit-file> | -x) <expr> ' . |
88 '-e) <edit-file> | -x) <expr> ' . |
88 '-k)eep original data-source id' . |
89 '[-k)eep original data-source id] ' . |
89 "<input file> <output file>\n") |
90 "<input file> <output file>\n") |
90 unless (&getopts('ke:x:') && @ARGV == 2); |
91 unless (&getopts('ke:x:') && @ARGV == 2); |
91 |
92 |
92 die("$0: -e <edit-file> or -x <expr> required\n") |
93 die("$0: -e <edit-file> or -x <expr> required\n") |
93 unless (defined($opt_x) || -r $opt_e); |
94 unless (defined($opt_x) || -r $opt_e); |