The code/nav/ suite comprises 35 command-line utilities for ingesting, filtering, editing, lever-arm translating, merging, and exporting vessel and vehicle navigation data across the Ocean Mapping Group (OMG) processing pipeline.
The Binary .nav Architecture (jcu_nav_rec)
All tools in code/nav/ operate around the fixed-length 48-byte binary navigation record (jcu_nav_rec, defined in code/subr/jcu_nav.h with JCU_BINNAV_RECLEN = 48). Because every record is exactly 48 bytes in big-endian/swapped on-disk format (nav_read() / nav_write() in code/subr/jcu_nav.c), utilities can determine record counts instantaneously from file size (ftell(fp) / 48) and perform $O(\log N)$ binary time searches (nav_time_search_double()).
Interpolates binary .nav records onto .merged, .ss, .svp, or .adcp files with 3D lever-arm rotation (-ahead, -right, -below, -use_params) and latency correction (-delay).
Extracts ping timestamps, vessel positions, outer-beam footprints (-port, -stbd, -zigzag), or attitude/tide/backscatter series from .merged or .ss files into .nav or ASCII format.
Translates 3D antenna coordinates (lat, lon, and ellipsoid height stored in azi) to the vessel Reference Point (<prefix>.nav.at_RP) using roll, pitch, and heading from <prefix>.orientation*.
Interactive .nav record browser/editor and batch diagnostic tool (-check for $\Delta t$ and negative time jump analysis, -fix_midnight for 24-hr rollover repair, -show_centre_fix).
Concatenates .nav files into -comp while dropping consecutive duplicate lat/lon fixes or rejecting forward/backward time jumps exceeding -reject_timejump_over <sec>.
Recomputes vessel speed over ground (velocity) and course over ground (azi) from first differences of $(\text{lat}, \text{lon}, t)$ in-place, or flags anomalous velocity/time steps (-check).
Computes total survey trackline distance (km) and duration (minutes/hours/days) across binary .nav files or planned ASCII waypoint lines (-ascii -speed_knots).
Converts fixed-width (125-byte or -new 105-byte) Ashtech PNAV post-processed GPS files into binary .nav format with satellite count, PDOP, and solution flags.
Inspects .shp/.shx headers and exports Shapefile geometries (with optional UTM-to-WGS84 unprojection via -merid) to OMG ASCII contour/segment format or binary .nav (-navbin).