makeSquat
Overview
makeSquat calculates vessel dynamic draft (settlement/squat) as a power-law function of vessel speed (velocity) stored in one or more OMG binary jcu_nav_rec navigation files, and writes the resulting vertical squat offset into the azi field of each navigation record in-place.
Because OMG binary tide files use the exact same jcu_nav_rec structure (storing vertical offsets in azi), a .nav file processed by makeSquat can be passed directly into mergeTide (for example with -DDC or -add) to apply speed-dependent dynamic draft corrections to .merged multibeam lines.
Syntax & CLI Options
makeSquat [OPTIONS] -power <exp> -scaler <coeff> <navfile(s)...>
| Option | Description | Default |
|---|---|---|
-power <value> | Exponent $p$ applied to vessel velocity in the power-law squat formula. | Required for valid calculation (e.g., 1.8) |
-scaler <value> | Multiplier coefficient $a$ applied to pow(velocity, power). | Required for valid calculation (e.g., 0.0018) |
<navfile(s)...> | Required. One or more binary jcu_nav_rec files (up to 300 files) to modify in-place. | None |
-ascii | Sets internal ascii_flag (parsed on CLI). | Disabled |
-v | Print record index, velocity, and computed squat for every navigation record. | Disabled |
How It Works
- Opens each specified binary
jcu_nav_recfile in read-update mode ("r+") and determines the total number of records (ftell(file) / JCU_BINNAV_RECLEN). - For each record $k$, reads
tide_recand computes dynamic draft fromtide_rec.velocity: \(\text{squat} = \text{sq\_scaler} \times (\text{velocity})^{\text{sq\_power}}\) - Stores the computed value in
tide_rec.aziand overwrites record $k$ in-place vianav_write.
Important: Because
makeSquatoverwrites theazi(heading/tide) field of<navfile(s)>in-place, always runmakeSquaton a copy of your.navfile rather than your primary navigation archive.
Examples
1. Generate a dynamic draft (squat) correction file from vessel navigation and merge into .merged v4 files:
cp vessel_nav.bin vessel_squat.bin
makeSquat -power 1.8 -scaler 0.0018 vessel_squat.bin
mergeTide -DDC -tide vessel_squat.bin merged/JD150/*.merged