mergeMWascii
Overview
mergeMWascii merges R/V Moana Wave fixed-width ASCII navigation (-nav), speed/azimuth (-spa), and centerbeam depth (-dep) logs onto unpacked OMG HAWAII MR1 sidescan records (OMG_MR1_ss_rec, e.g., .slr_ss), applying an optional time lag (-lag) and computing towfish altitude from interpolated water depth minus towfish depth.
Usage
mergeMWascii (-v) (-lag 120) -nav navfile -spa speedazifile -dep bathyfile \
-in infile -out outfile
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-nav | <navfile> | required | Input 48-byte fixed-width R/V Moana Wave ASCII navigation file. |
-spa | <speedazifile> | required | Input 46-byte fixed-width R/V Moana Wave ASCII speed and gyro azimuth file. |
-dep | <bathyfile> | required | Input 33-byte fixed-width R/V Moana Wave ASCII water depth file. |
-in | <infile> | required | Input OMG MR1 sidescan file (.slr_ss or .raw_ss). |
-out | <outfile> | required | Output merged OMG MR1 sidescan file (e.g., .slr_mer). |
-lag | <seconds> | 0 | Time lag in seconds subtracted from the MR1 ping timestamp (need_time = slr_rec.header.time - lag) to account for towfish layback or clock offsets. |
-v | none | 0 | Enable verbose output. |
How It Works
- Binary Search Lookup: For each
OMG_MR1_ss_recin-in, computesneed_time = slr_rec.header.time - lagand performs binary searches across the fixed-width ASCII files (get_mw_nav,get_mw_spazi,get_mw_depth). - Linear Interpolation & Altitude Update:
- Linearly interpolates
latandlonbetween bracketing 48-byte nav records. - Reads the nearest ADCP/gyro heading from
-spaand converts it to radians (azi *= M_PI / 180.0). - Linearly interpolates water
depthbetween bracketing 33-byte depth records and setsslr_rec.header.altitude = depth - slr_rec.header.fishdepth.
- Linearly interpolates
- Output: Writes the updated
OMG_MR1_ss_recto-out.
Practical Examples
Merge Moana Wave navigation, gyro, and depth onto MR1 slant-range sidescan
mergeMWascii -v -lag 120 -nav mw9204.nav -spa mw9204.spa -dep mw9204.dep \
-in MR19208512.00.slr_ss -out MR19208512.00.slr_mer