jsf2omg
Overview
jsf2omg converts EdgeTech interferometric bathymetry data (JSF_Bathymetric_3000_Data, message type 3000) and pressure/sound-speed sensor data (JSF_Pressure_3002_Data, message type 3002) from an EdgeTech .jsf file (such as EdgeTech 4600, 6205, or Gavia AUV 2205 systems) into a 1000-beam OMG-HDCS v4 .merged file (toolType = EdgeTech_4600), along with a .param file containing the $60^\circ$ port/starboard transducer mount angles. Because interferometric sonars produce thousands of raw angle/range samples per ping channel, jsf2omg filters samples by quality factor, amplitude, angle, and water-column/non-seabed flags, and averages them into 1000 across-track spatial bins (500 port, 500 starboard) or preserves raw sample indices when -dontbin is specified.
Usage
jsf2omg (-bin <m> | -dontbin) [OPTIONS] -jsf <input_name.jsf> -omg <omg_file_prefix>
[!IMPORTANT] You must specify either
-bin <meters>or-dontbinon the command line; otherwisejsf2omgexits withMust specify across-track binsize (m).
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-jsf | <input_name.jsf> | Required | Path to the input EdgeTech .jsf file. |
-omg | <omg_file_prefix> | Required | Output prefix for .merged, .merged.ss_data, .sonar_settings, and .param. |
-bin | <meters> | Required (or -dontbin) | Across-track bin width in meters used to average interferometric soundings into the 1000 OMG beam slots (bins 0..499 port, 500..999 starboard). |
-dontbin | None | Off | Do not spatially bin across-track; assign port samples directly to beams 499 - i and starboard samples to 501 + i. |
-min_qf | <0.0..1.0> | 0.70 | Minimum bathymetry quality factor (((quality & 0xFF00) >> 8) / 255.0) required to accept a sample. |
-min_amplitude | <int> | 10 | Minimum raw sample amplitude required to accept a sounding. |
-max_angle | <degrees> | 90.0 | Maximum vertically referenced angle (degrees from nadir) to accept. |
-min_angle | <degrees> | -20.0 | Minimum vertically referenced angle (degrees) to accept (prevents cross-nadir leakage). |
-ignore_wc | None | Off | Reject samples flagged as water column (quality & 0x0001). |
-ignore_nonseabed | None | Off | Reject samples flagged as non-seabed (quality & 0x0002). |
-v | None | Off | Print parsed message structures and per-sample binning details. |
-debug | None | Off | Enable debug flag. |
How It Works
- Initial Scan: Scans the
.jsffile for the first message3002(JSF_Pressure_3002_Data) to obtain initialsound_speedand the first message3000(JSF_Bathymetric_3000_Data) to establishbase_time, then rewinds to the start of the file. - Quality Filtering & Across-Track Binning: For each message
3000(channel0= port, channel1= starboard), filters each sample by-min_qf,-ignore_wc,-ignore_nonseabed,-min_amplitude,-max_angle, and-min_angle. Computes slant range (twtt * sound_speed / 2.0), across-track distance (-range * sin(angle)), and depth (range * cos(angle)), and accumulates valid samples intobinned_beams[0..999], subtracting the $60^\circ$ transducer mount angle soRc_steeris stored relative to the transducer normal. - AUV Pressure Depth & OMG Output: When both port and starboard channels of a ping have been accumulated, incorporates any AUV/towfish pressure depth (
last_good_pressure_depthfrom message3002) intoprofile.deepdraftoffset_in_metres,profile.draft_at_Tx, andbeams[i].observedDepth, stores the sample count per bin inbeams[i].Q_factor, and writes the 1000-beam profile to<prefix>.merged. Finally, writesdRoll = +60.0and-60.0to<prefix>.param.
Practical Examples
1. Convert an EdgeTech 4600/6205 JSF file using 0.20 m across-track bins:
jsf2omg -bin 0.20 -min_qf 0.75 -ignore_wc -ignore_nonseabed -jsf line01.jsf -omg line01