1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
2 #====================================================================== |
2 #====================================================================== |
3 # L I S T E N S |
3 # L I S T E N S |
4 # doc: Sat Jan 18 18:41:49 2003 |
4 # doc: Sat Jan 18 18:41:49 2003 |
5 # dlm: Mon Sep 8 19:22:44 2014 |
5 # dlm: Thu Mar 17 07:39:49 2016 |
6 # (c) 2003 A.M. Thurnherr |
6 # (c) 2003 A.M. Thurnherr |
7 # uE-Info: 244 0 NIL 0 0 72 2 2 4 NIL ofnI |
7 # uE-Info: 49 0 NIL 0 0 72 2 2 4 NIL ofnI |
8 #====================================================================== |
8 #====================================================================== |
9 |
9 |
10 # Print useful info from the ensemble list or dump ensembles to |
10 # Print useful info from the ensemble list or dump ensembles to |
11 # separate files. |
11 # separate files. |
12 |
12 |
43 # - changed -E from prefix to suffix |
43 # - changed -E from prefix to suffix |
44 # - added active header line to -E output |
44 # - added active header line to -E output |
45 # Mar 4, 2014: - added partial support for DATA_SOURCE_ID |
45 # Mar 4, 2014: - added partial support for DATA_SOURCE_ID |
46 # - added support for missing PITCH/ROLL/HEADING |
46 # - added support for missing PITCH/ROLL/HEADING |
47 # Sep 8, 2014: - added -B)T |
47 # Sep 8, 2014: - added -B)T |
|
48 # Mar 17, 2016: - adapted to new Getopt library |
48 |
49 |
49 # Notes: |
50 # Notes: |
50 # - -E outputs data in earth coordinates, unless -b is set also |
51 # - -E outputs data in earth coordinates, unless -b is set also |
51 # - -E output is always in ANTS format, ignoring -A |
52 # - -E output is always in ANTS format, ignoring -A |
52 # - no soundspeed correction |
53 # - no soundspeed correction |
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 |
59 |
59 die("Usage: $0 [-A)nts] [-Q)uiet (errcheck only)] " . |
60 die("Usage: $0 [-A)nts] [-Q)uiet (errcheck only)] " . |
60 "[-f)ields <[name=]FIELD[,...]>] " . |
61 "[-f)ields <[name=]FIELD[,...]>] " . |
61 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
62 "[require -4)-beam solutions] [-d)iscard <beam#>] " . |
62 "[write -E)nsemples <.suff> [use -B)T] [-M)agnetic <declination>] [min -p)ercent-good <#>] [keep -b)eam coords]] " . |
63 "[write -E)nsemples <.suff> [use -B)T] [-M)agnetic <declination>] [min -p)ercent-good <#>] [keep -b)eam coords]] " . |
63 "[-r)ange <first_ens,last_ens>] [in-w)ater ensembles only] " . |
64 "[-r)ange <first_ens,last_ens>] [in-w)ater ensembles only] " . |
64 "<RDI file...>\n") |
65 "<RDI file...>\n") |
65 unless (&Getopts("4ABbd:E:f:M:p:Qr:w") && $#ARGV >= 0); |
66 unless (&getopts("4ABbd:E:f:M:p:Qr:w") && $#ARGV >= 0); |
66 |
67 |
67 print(STDERR "WARNING: no soundspeed correction applied!\n"); |
68 print(STDERR "WARNING: no soundspeed correction applied!\n"); |
68 |
69 |
69 print(STDERR "WARNING: magnetic declination not set!\n") |
70 print(STDERR "WARNING: magnetic declination not set!\n") |
70 if defined($opt_E) && !defined($opt_M); |
71 if defined($opt_E) && !defined($opt_M); |