repoint
Description
repoint is a utility for correcting beam steering angles in OMG-HDCS merged files due to changes in the surface sound speed. When the actual surface sound speed differs from the one assumed during data acquisition, the calculated beam angles can be inaccurate. This tool allows recalculating these angles based on a new (or interpolated) surface sound speed, thereby “repointing” the beams.
It can either use a constant specified sound speed or interpolate from a .surf_ss file to determine the correct surface sound speed for each ping.
Usage
repoint -in <filename.merged> (-ssp_file <ssp.bin> | -speed <val>) [OPTIONS]
Arguments
| Option | Description | |
|---|---|---|
-in <filename.merged> | Required. Path to the input OMG-HDCS merged file. This file is modified in place unless -just_test is used. | |
-ssp_file <ssp.bin> | Required (one of this or -speed). Path to an SSP file (either .nav or .orientation format) containing surface sound speed measurements. The tool will interpolate the SSP from this file for each ping. | |
-speed <val> | Required (one of this or -ssp_file). Specifies a constant surface sound speed value (m/s) to use for repointing. | |
-orig_speed <val> | Specifies the original surface sound speed value that was used during data acquisition. This is useful if the original speed is not reliably stored in the merged file or if you wish to override it. | Auto-read from merged file |
-just_test | Runs the repointing logic but does not write any changes back to the merged file. Useful for previewing changes. | |
-v | Enable verbose output. |
How It Works
- Input Reading: Opens the target merged file and optionally an SSP file (if
-ssp_fileis used). - Surface Sound Speed Determination:
- If
-speedis used, thenew_sspis set to the provided constant value. - If
-ssp_fileis used, for each ping in the merged file, the tool interpolates the surface sound speed from the provided SSP file at the ping’s timestamp. - The
old_ssp(original surface sound speed) is determined either from the merged file’s profile header (td_sound_speedorsoundVelocity) or overridden by-orig_speed.
- If
- Beam Repointing: For each ping and each beam within that ping:
- It retrieves the transmit (Tx) and receive (Rx) steering angles from the beam structure.
- It then applies a trigonometric correction (using the
repoint_anglefunction) to both the Tx and Rx steering angles based on theold_sspandnew_ssp. This correction adjusts the angles as if they were originally recorded with thenew_ssp. - Special Handling: For some older sonar types (e.g., ISIS_Submetrix), which might store Rx steering angles in the
beam_depress_anglefield, a “kloodge” (workaround) is applied to ensure the repointed angles are written back correctly.
- In-Place Update: The corrected Tx and Rx steering angles are written back to the respective
Tx_steerandRc_steerfields (orbeam_depress_anglefor kloodged sonars) in the beam structures of the merged file. Thetd_sound_speedorsoundVelocityin the profile header is also updated to thenew_ssp.
Output Files
The input merged file (-in) is modified in-place (unless -just_test is used).
Dependencies
OMG_HDCS_jversion.h: For OMG-HDCS data structures.support.h: For general utility functions and error handling.j_nav.h: For navigation data handling (if-ssp_fileis used).j_attitude.h: For attitude data handling (if-ssp_fileis used).
Notes
Beam steering angles are highly sensitive to the surface sound speed. Inaccurate assumptions about this parameter during data acquisition can lead to significant errors in depth and position. repoint provides a way to correct these errors post-acquisition, improving the overall accuracy of the bathymetry. The tool modifies merged files in place, so backups are recommended. The just_test option is useful for previewing the effects of repointing before committing changes.