gsf2svp
Overview
gsf2svp extracts all GSF_SOUND_VELOCITY_PROFILE records from a Generic Sensor Format (.gsf) file and writes each profile into a numbered OMG watercolumn format v2 file (<prefix>_001, <prefix>_002, etc.).
Usage
gsf2svp [-v] -gsf <input_name.gsf> -omg <omgfile.svp_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-gsf | <input_name.gsf> | Required | Path to the input .gsf file. |
-omg | <omgfile.svp_prefix> | Required | Output prefix; creates <omgfile.svp_prefix>_001, <omgfile.svp_prefix>_002, etc. |
-v | None | Off | Print every parsed GSF_Sound_Velocity_Profile record to stdout. |
How It Works
- Packet Scanning: Loops through the
.gsffile usingseek_GSF_packet(infile, GSF_SOUND_VELOCITY_PROFILE, &buffer)and decodes each SVP record viaparse_GSF_Sound_Velocity_Profile(). - Conversion to OMG
watercolumn: For each SVP recordN, opens<outname>_NNN, populatestime_of_obs,time_of_rec,lat_obs,lon_obs, and converts each(depth[i], sound_speed[i])pair from centimeters and cm/s into meters and m/s (/ 100.0), writing the structure viajWC_write().
Practical Examples
1. Extract all sound velocity profiles from a GSF file:
# Creates line01.svp_001, line01.svp_002, etc.
gsf2svp -v -gsf line01.gsf -omg line01.svp