gsf2omg
Overview
gsf2omg converts Generic Sensor Format (.gsf) Swath Bathymetry Ping records (GSF_SWATH_BATHYMETRY_PING) into OMG-HDCS v3 .merged and .merged.ss_data files using the lightweight omg_gsf parser. It primarily targets Reson SeaBat 8100-series (8101 and 8125) GSF files where navigation and attitude have already been merged into the ping headers.
Usage
gsf2omg [-v] [-debug] -gsf <input_name.gsf> -omg <omg_file_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-gsf | <input_name.gsf> | Required | Path to the input .gsf file. |
-omg | <omg_file_prefix> | Required | Output prefix for <omg_file_prefix>.merged and <omg_file_prefix>.merged.ss_data. |
-v | None | Off | Print every parsed GSF_Swath_Bathymetry_Ping record. |
-debug | None | Off | Enable debug flag. |
How It Works
- Valid Reference Coordinate Scan: Scans forward through
GSF_SWATH_BATHYMETRY_PINGpackets until it finds a ping with valid geographic coordinates ($\text{lat} \in (-90^\circ, 90^\circ)$, $\text{lon} \in (-180^\circ, 180^\circ)$) to avoid corruptingsummary.refLatandsummary.refLongwith initial zeroed/invalid fixes. - Summary Initialization: Checks
gsf_bathy.reson_8100.sonar_model(8101$\rightarrow$SeaBat_8101,8125$\rightarrow$SeaBat_8125) and writes anOMG_HDCS_summary_header(version 3). - Ping & Beam Conversion: For each
GSF_SWATH_BATHYMETRY_PING, convertstide_correctoranddepth_correctorfrom centimeters to millimeters (* 10.0), converts embedded ping latitude, longitude, roll, pitch, heave, and heading into OMG profile header units, unscalesdepth,across_track, andalong_trackusing the GSF subrecordscale_factorstable, marks beams withflag & 0x01as rejected (status = 22), and writes each ping to<prefix>.merged.
Practical Examples
1. Convert a Reson 8101 GSF file into OMG .merged format:
gsf2omg -v -gsf line01.gsf -omg line01