sdf2nav
Overview
sdf2nav extracts Applanix POS/MV Group 102 navigation fixes embedded inside Klein Sonar Data Format (.sdf) records and writes them to a binary OMG jcu_nav_rec navigation file (<nav_file_prefix>.nav).
Usage
sdf2nav [-v] [-debug] -sdf <input_name.sdf> -nav <nav_file_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-sdf | <input_name.sdf> | Required | Path to the input Klein .sdf file. |
-nav | <nav_file_prefix> | Required | Output prefix; creates <nav_file_prefix>.nav. |
-v | None | Off | Enable verbose output. |
-debug | None | Off | Enable debug flag. |
How It Works
- Base Date Calculation: Opens the
.sdffile viaopen_SDF_File(), reads the first valid SDF record (seek_SDF_Record/read_SDF_Record), and computesbase_timeat00:00:00UTC of the headerβs calendar date (year,month,day). - POS/MV Group 102 Extraction: Iterates through all SDF records and loops over
reader->posmv_102[0..posmv_102_count-1]. Verifiescommon.time_select == 1, computes UTC timestamp frombase_time + (time1 % 86400), and writeslatitudeandlongitudeto<nav_file_prefix>.nav.
Practical Examples
1. Extract POS/MV navigation from a Klein HydroChart .sdf file:
sdf2nav -sdf line01.sdf -nav line01