listHdr
changeset 61 69192495f0db
parent 58 78607e2e8add
--- a/listHdr
+++ b/listHdr
@@ -2,9 +2,9 @@
 #======================================================================
 #                    L I S T H D R 
 #                    doc: Sat Jan 18 18:41:49 2003
-#                    dlm: Wed Mar 17 22:53:25 2021
+#                    dlm: Mon Oct 18 11:05:30 2021
 #                    (c) 2003 A.M. Thurnherr
-#                    uE-Info: 50 35 NIL 0 0 72 10 2 4 NIL ofnI
+#                    uE-Info: 117 41 NIL 0 0 72 10 2 4 NIL ofnI
 #======================================================================
 
 # Print useful info from the RDI BB header
@@ -48,6 +48,7 @@
 #					with this utility any more
 #	Mar  6, 2021: - adapted to Nortek Signature data files
 #	Mar 17, 2021: - updated HISTORY
+#	Aug 23, 2021: - added power and bandwidth to -s output
 
 use Getopt::Std;
 
@@ -61,7 +62,8 @@
 if ($opt_s) {
 	print("#!/usr/bin/perl -S list\n");     
 	chmod(0777&~umask,*STDOUT);
-	print("#ANTS#FIELDS# {id} {serial_number} {transducer_frequency} {number_of_bins} {blanking_distance} {bin_length} {pulse_length}\n");
+	print("#ANTS#FIELDS# {id} {serial_number} {transducer_frequency} {max_power} {bandwidth}" .
+					   " {number_of_bins} {blanking_distance} {bin_length} {pulse_length}\n");
 }
 
 while ($ARGV[0] ne '') {
@@ -78,8 +80,9 @@
 			$id =~ s@^.*/([^/]+)@\1@;
 		}
 		if ($valid) {
-			printf("%s %d %.1f %d %g %d %.1f\n",
+			printf("%s %d %.1f %d %s %d %g %d %.1f\n",
 				$id,$hdr{SERIAL_NUMBER},$hdr{BEAM_FREQUENCY},
+				$hdr{TRANSMIT_POWER_MAX},($hdr{NARROW_BANDWIDTH} ? 'narrow' : 'wide'),
 				$hdr{N_BINS},$hdr{BLANKING_DISTANCE},$hdr{BIN_LENGTH},
 	            $hdr{TRANSMITTED_PULSE_LENGTH});
 	    } else {
@@ -111,7 +114,7 @@
 	printf("\tSPEED_OF_SOUND\t\t\t= %d m/s [%s]\n",
 				$hdr{SPEED_OF_SOUND},
 				$hdr{SSPEED_CALCULATED} ? 'using measurements' : 'from settings');
-	printf("\tAMBIGUITY_VELOCITY\t\t= %.1f m/s\n",
+	printf("\tAMBIGUITY_VELOCITY\t\t= %.2f m/s\n",
 				ambiguity_velocity($hdr{BEAM_FREQUENCY},$hdr{BEAM_ANGLE},$hdr{SPEED_OF_SOUND},$hdr{TRANSMIT_LAG_DISTANCE}))
 					unless ($hdr{INSTRUMENT_TYPE} eq 'Signature');