sdf2orientation
Overview
sdf2orientation extracts Applanix POS/MV Group 102 attitude records (roll, pitch, heave, and heading) embedded inside Klein Sonar Data Format (.sdf) files and writes them to a binary OMG-HDCS v3 .orientation file (<orientation_prefix>.orientation).
Usage
sdf2orientation [-v] [-debug] -sdf <input_name.sdf> -orientation <orientation_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-sdf | <input_name.sdf> | Required | Path to the input Klein .sdf file. |
-orientation | <orientation_prefix> | Required | Output prefix; creates <orientation_prefix>.orientation. |
-v | None | Off | Enable verbose output. |
-debug | None | Off | Enable debug flag. |
How It Works
- Header & Base Time Initialization: Reads the first valid SDF record to determine the UTC date (
year,month,day), computesbase_timeat midnight UTC, and writes anOMG_HDCS_summary_attitudeheader (status = 15for roll, pitch, heave, and heading) to<orientation_prefix>.orientation. - POS/MV Group 102 Extraction: Iterates through all SDF records and loops over
reader->posmv_102[0..posmv_102_count-1]. Convertsroll,pitch,heave, andheadingto hundredths of degrees/meters (* 100.0 + 0.5) and writes eachOMG_HDCS_attituderecord viaOMG_HDCS_write_attitude().
Practical Examples
1. Extract POS/MV orientation from a Klein .sdf file:
sdf2orientation -sdf line01.sdf -orientation line01