gsf2orientation
Overview
gsf2orientation extracts full time-series attitude packets (GSF_ATTITUDE, record ID 6) from a Generic Sensor Format (.gsf) file and writes them to a binary OMG-HDCS v3 .orientation file.
Usage
gsf2orientation [-v] -gsf <input_name.gsf> -omg <omgfile.orientation>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-gsf | <input_name.gsf> | Required | Path to the input .gsf file. |
-omg | <omgfile.orientation> | Required | Path to the output OMG .orientation file. |
-v | None | Off | Print every parsed GSF_Attitude packet and individual attitude measurements (time, roll, pitch, heading, heave). |
How It Works
- Summary Header Initialization: Scans the
.gsffile for the firstGSF_ATTITUDEpacket (seek_GSF_packet), extractsbasetime.secondsandbasetime.nanoseconds, rewinds the file, and writes anOMG_HDCS_summary_attitudeheader (fileVersion = 3,status = 15for RPH+heave). - Bundle Unpacking: Because each
GSF_ATTITUDEpacket stores a bundle ofnum_pointsmeasurements with millisecond offsets (time_offset[i]) relative torecordBaseTime,gsf2orientationloops over allnum_pointsin each packet, preserves the native GSF integer scaling (hundredths of degrees for roll/pitch/heading, centimeters for heave), and writes each sample to<omgfile.orientation>.
Practical Examples
1. Extract high-rate attitude from a GSF file:
gsf2orientation -v -gsf line01.gsf -omg line01.orientation