asc2bin.py, experimental version of serasc2bin.py, presently for UHDAS files only. Does NOT parse ascii files from other logging systems: Use serasc2bin.py Usage: asc2bin.py [] [-y 2001] ... [-o outputdirectory] file1 [file2 ...] Reads ascii files written by UHDAS and writes corresponding files in binary double precision. Output file name is the input file name with '.rbin' appended, unless the --message and/or --add_extension options are used. By default, if a file of that name already exists, the corresponding input file will not be processed. Use '--redo' option to reprocess in this case. Use '--update' to append to an rbin file if it already exists. This can be used to continually update an rbin file as the source file is being written. Gzipped input files are handled transparently, without being explicitly gunzipped; the '.gz' extension is ignored when generating the output filename, unless the '-a' option is used. -h or --help: print this message and exit -r or --redo: process all input files, regardless of whether an output file already exists -u or --update: process incrementally -s or --seconds: with -u, timeout in seconds (floating point) -o or --outdir: directory for output files -m or --message: desired output file type (without the dot) -y or --yearbase: 4-digit yearbase -l or --log_yearbase" 4-digit yearbase (yearbase used for $UNIXD during logging). defaults to same as yearbase if unspecified -v or --verbose: print short diagnostics -V or --Verbose: echo line number and line, so we can see where it chokes -S or --showbad: echo line number and line when they are rejected, so we can see what junk is in the file -a or --add_extension: Add the message extension to the input file name, instead of replacing the input file extension -t or --type: 'rvdas', 'uh', 'vmdas',... ('uh' is default) -c or --count: for vmdas only: VmDAS may have more than one serial message per timestamp (PADCP); the timestamp comes at the end of a group. Use "--count" to specify which messages to store. The field "count" starts with zero just prior to the PADCP message and decreases backwards in time. count switch: outputs first (output the serial message at the beginning of the collection for the ensemble; corresponds to raw data structure nav.txy1) last (output the serial message at the end (nav.txy2)). DEFAULT all (output all serial messages) NOTE: the first entry, 'u_dday', is the time of the PC doing the logging. For UHDAS, this is the linux clock time For rvdas, it is a GGA timestamp For VmDAS, it is the PC clock time. Subtract sec_pc_minus_utc to get UTC File or message types: gps GGA messages. .gps.bin fields are logger decimal day, GGA decimal day, lon degrees, lat degrees. ??GGA message (e.g., INGGA or GPGGA) gga same as gps spd soundspeed .spd.bin fields are logger decimal day, soundspeed in m/s. hdg gyro heading .hdg.bin fields are logger decimal day, heading in degrees. HEHRC or HEHDT messages are read. hnc gyro heading, NO CHECKSUM .hdg.bin fields are logger decimal day, heading in degrees. HEHRC or HEHDT messages are read. adu Ashtech $PASHR,ATT .adu.bin fields are logger decimal day, ATT decimal day (GPS days in week), heading, pitch, roll, mrms, brms, reacq flag. pmv POS/MV $PASHR .pmv.bin fields are logger decimal day, GGA decimal day, heading, pitch, roll, heave, accuracy of roll, of pitch, of heading, heading flag, IMU flag. GAMS flag: (0=no aiding, 1=GPS aiding, 2 = GAMS aiding) IMU flag: (0 = no IMU; 1 = using IMU ) rdi (various) $PRDID .rdi.bin fields are logger decimal day, pitch, roll, heading. There is no error checking. psxn20 Seapath $PSXN,20 logger decimal day, quality for: horizontal, height, heading, roll&pitch. psxn23 Seapath $PSXN,23 logger decimal day, roll, pitch, heading, heave sea logger decimal day, roll, pitch, heading, heave, quality for: height, heading, roll&pitch. (The psxn23 fields preceed the psxn20 fields.) gps_sea same as gga, but with horizontal quality column from psxn20 appended Note: there is a slight difference in the logger decimal day for the Seapath gga file versus the gps_sea. In the latter, the time stamp is the one from the psxn20 message, which arrives immediately after the gga. Fixing this would be more trouble than it is worth.