equal
deleted
inserted
replaced
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: Tue Apr 19 21:11:12 2016 |
5 # dlm: Wed Nov 9 12:27:32 2016 |
6 # (c) 2003 A.M. Thurnherr |
6 # (c) 2003 A.M. Thurnherr |
7 # uE-Info: 181 53 NIL 0 0 72 2 2 4 NIL ofnI |
7 # uE-Info: 115 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 |
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 # Mar 17, 2016: - adapted to new Getopt library |
49 # Apr 19, 2016: - added %date, %time to -E output |
49 # Apr 19, 2016: - added %date, %time to -E output |
|
50 # Nov 9, 2016: - BUG: no error on missing files |
50 |
51 |
51 # Notes: |
52 # Notes: |
52 # - -E outputs data in earth coordinates, unless -b is set also |
53 # - -E outputs data in earth coordinates, unless -b is set also |
53 # - -E output is always in ANTS format, ignoring -A |
54 # - -E output is always in ANTS format, ignoring -A |
54 # - no soundspeed correction |
55 # - no soundspeed correction |
104 |
105 |
105 #---------------------------------------------------------------------- |
106 #---------------------------------------------------------------------- |
106 # MAIN |
107 # MAIN |
107 #---------------------------------------------------------------------- |
108 #---------------------------------------------------------------------- |
108 |
109 |
109 while (-f $ARGV[0]) { |
110 while ($ARGV[0] ne '') { |
|
111 die("$ARGV[0]: No such file or directory\n") |
|
112 unless (-f $ARGV[0]); |
|
113 |
|
114 readData(@ARGV,\%dta); |
110 if ($opt_A && !$opt_E) { |
115 if ($opt_A && !$opt_E) { |
111 print("#ANTS#PARAMS# RDI_file{$ARGV[0]}\n"); |
116 print("#ANTS#PARAMS# RDI_file{$ARGV[0]}\n"); |
112 } elsif (!$opt_Q) { |
117 } elsif (!$opt_Q) { |
113 print(STDERR "$ARGV[0]: "); |
118 print(STDERR "$ARGV[0]: "); |
114 } |
119 } |
115 readData(@ARGV,\%dta); |
|
116 printf(STDERR "%d complete ensembles...\n",scalar(@{$dta{ENSEMBLE}})) |
120 printf(STDERR "%d complete ensembles...\n",scalar(@{$dta{ENSEMBLE}})) |
117 unless ($opt_Q); |
121 unless ($opt_Q); |
118 $dta{HEADING_BIAS} = -$opt_M; # magnetic declination |
122 $dta{HEADING_BIAS} = -$opt_M; # magnetic declination |
119 shift; |
123 shift; |
120 |
124 |