xtf2omg_reson
Overview
xtf2omg_reson converts Reson SeaBat 8100-series (8101, 8111, 8125, 8150, 8160) multibeam bathymetry (XTF_HEADER_BATHY, ID 2), sidescan traces (XTF_HEADER_SONAR, ID 0), and snippets (XTF_HEADER_RESON_SNIPPET, ID 19) from an XTF file into OMG-HDCS v3 .merged and .merged.ss_data files.
Usage
xtf2omg_reson [OPTIONS] -xtf <inputfile.xtf> -omg <name_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-xtf | <inputfile.xtf> | Required | Path to the input .xtf file (automatically loads <basename>.idx if present). |
-omg | <name_prefix> | Required | Output prefix for <name_prefix>.merged and <name_prefix>.merged.ss_data. |
-sonar | 8101|8111|8125|8150|8160 | Auto from packet | Override or specify the Reson SeaBat model number when not encoded in the Reson bathymetry packet (resonBathy.sonar_model). |
-fa | <degrees> | Off | Reject beams whose sonar-relative angle (not roll-stabilized) exceeds <degrees> from nadir. |
-fq | None | Off | Filter beams using Reson processor quality flags (rejects beams with quality $\le$ threshold). |
-rx_beamwidth | <hundredths_deg> | From packet | Override receiver beamwidth (specified in hundredths of a degree, e.g., 150 for $1.5^\circ$); required for legacy 8150 packets (< 0x17). |
-ER | None | Off | Specify that an Extended Range (-ER) projector was used on a SeaBat 8101 (increases default source level txLevel from 210 dB to 220 dB). |
-skipSS | None | Off | Do not extract sidescan trace packets (XTF_HEADER_SONAR, ID 0). |
-ignoreSSTimeDuration | None | Off | Compute sidescan sample interval from SlantRange / (velocity / 2) / NumSamples instead of trusting portPingChan.TimeDuration. |
-ss_old | None | 0 (New) | Flag sidescan as legacy Reson format (profile.params[1].txBeamIndex = 1). |
-head_temp | None | Off | Store Reson transducer head temperature (resonBathy.temperature) into profile.params[1].bscatClass instead of sound velocity (for downstream use with headtemp2speed). |
-force_sync | <method_id> | Auto-detect | Force a specific XTF time synchronization method (get_xtf_synchro). |
-ping | <ping_num> | -1 (Off) | Dump trace, beam, and snippet ASCII debug files for a single specified ping index. |
-whine | <count> | 0 | Maximum number of missing sidescan or snippet warnings to print. |
-v | None | Off | Enable verbose diagnostic output. |
-debug | None | Off | Print detailed calibration and parameter packing diagnostics. |
How It Works
- Indexing & Synchronization: Reads
<basename>.idxor builds an XTF index viabuildXTFIndex(), auto-detects the clock synchronization scheme (get_xtf_synchro()), and determinesbaseTime. - Calibration & Parameter Packing: Stores Reson acoustic parameters (source level
txLevel,pulse_width,tvg_spread,tvg_absorp, sound velocity or head temperature, transmit/receive beamwidths, and pitch steering angle) intoprofile.params[0]andprofile.params[1]. - Sidescan & Beam Intensity Packing:
- Matches
XTF_HEADER_SONARpackets viagimme_matching_ss(), reverses port trace sample order, promotes 8-bit traces to 16-bit ifbytesPerSample == 1, and writes big-endian 16-bit traces to<prefix>.merged.ss_data. - For
8101/8111, packs 8-bit beam intensities intoprofile.params[0..1].rxtime. For8125/8150/8160, writes 16-bit beam intensities to.merged.ss_dataand stores the file offset inprofile.params[0].rxtime.
- Matches
- Snippet Matching: If
XTF_HEADER_RESON_SNIPPET(ID 19) records exist, tracks any ping number offset (snippet_ping_offset), writes snippet samples to.merged.ss_data, and recordsno_samples,centre_no, andoffsetper beam.
Practical Examples
1. Convert a Reson 8101 XTF file with quality filtering and attitude/nav extraction:
xtf2omg_reson -sonar 8101 -fq -xtf line01.xtf -omg line01
xtf2orientation -xtf line01.xtf -omg line01.orientation
xtf2nav -nav sensor -hdg sensor -xtf line01.xtf -omg line01