newMergeAtt is a powerful and complex utility for processing OMG-HDCS merged multibeam sonar files. Its primary function is to re-raytrace sonar soundings using external sound velocity profiles (SVPs) and precise attitude data, thereby correcting for refraction and motion. It updates the depth, across-track, and along-track values of each beam, ensuring accurate bathymetry.
The tool incorporates advanced features like dynamic SVP selection based on time or distance, detailed motion compensation (including induced heave and crosstalk correction), and a high degree of configurability for sonar parameters and debugging.
Add additional transmit or receiver steering angles.
-flip_tx_steer / -flip_rx_steer
Flip the sign of transmit or receiver steering angles (e.g., for reverse-mounted sonars).
-roll_compensated
Force system to be recognized as roll compensated (beam angles are already vertically referenced).
Orientation Options
Option
Description
Default
-orientation_delay <sec>
Apply a time delay to the orientation data.
0.0
-no_orientation
Override error if no .orientation file is found (e.g., for single beam data).
-check_drift
Use value in profile.clock_drift_millis if it exists.
-alternate_orient <file>
Specify an alternate orientation file (must be .orientation format).
-uncrosstalk <val>
Specify a gyro offset to correct for crosstalk between roll and pitch.
0.0
SVP Selection for Multiple Profiles
Option
Description
-rules <file>
Provide a file specifying time-based rules for selecting SVPs.
-interpolate
Interpolate between SVPs in time.
-nearest_in_time
Select the SVP nearest in time.
-last_observed
Select the last observed SVP.
-next_observed
Select the next observed SVP.
-nearest_in_distance
Select the SVP nearest in distance.
-converge_to <depth> <velocity>
Quick and dirty profile extension, sets maximum depth and velocity for SVPs shallower than the specified depth.
Miscellaneous Options
Option
Description
Default
-just_merge
Just merge TX orientation onto the merged file, ignoring all other raytracing options.
-test
For testing new solution vs. solution already stored in merged file; does NOT write changes.
-flag
Flag soundings that have no solution (e.g., first few pings from RESON systems).
-mask_map <file>
Map of area of interest; ping positions outside the area are not processed.
-start_ping <num>
Specify start/end pings for processing; pings outside this range are not processed.
All pings
-end_ping <num>
Specify start/end pings for processing; pings outside this range are not processed.
All pings
-dump_depression
Dump final depression angle and azimuth for every beam (for RESON backscatter calibration). Creates a .depression file.
-OWTT_scaler <val>
A debug tool to scale the Observed Two-Way Travel Time (OWTT) (typically a power of 2).
1.0
-v
Enable verbose output.
-debug_wc
Enable water column debugging output.
-debug_ping <num>
Turn on debugging for a given ping number.
-debug_sounding
Turn on debugging for sounding geometry calculations.
-special
Print all sounding geometry information for testing.
How It Works
Initialization: Sets up various parameters from command-line arguments, including SVP file paths, raytracing methods, and debugging flags.
SVP Loading & Interpolation: Loads all specified SVP files. If multiple SVPs are provided, it determines the appropriate SVP for each ping based on user-defined rules or interpolation methods (time-based or distance-based).
Merged File Processing: Iterates through each ping in the input merged file:
Reads the profile header and all rational beams for the current ping.
For each beam, it calculates the sounding geometry using the selected raytracing method, the interpolated SVP, and corrected attitude (from an .orientation file). This involves detailed calculations of the beam path through the water column, accounting for refraction and motion.
Updates the depth, across-track, and along-track fields of each beam with the newly calculated values.
Updates the vesselHeave, vesselPitch, vesselRoll, and vesselHeading in the profile header with the merged TX orientation.
Output: Writes the updated profile headers (and optionally beam records if depths were re-calculated) back to the merged file.
Diagnostic Output: Provides verbose output about the merging process, time discrepancies, and corrected values if -v is enabled.
Output Files
The input merged file (<input.merged>) is modified in-place (unless -test is used).
<input.merged_prefix>.depression: A binary file containing final depression and azimuth angles for each beam (if -dump_depression is used).
Dependencies
OMG_HDCS_jversion.h: For OMG-HDCS data structures.
support.h: For general utility functions and error handling.
j_proj.h: For coordinate projection functions.
j_attitude.h: For attitude data handling.
j_watercolumn.h: For water column data handling (if SVP raytracing is used).
j_generic_beam_pattern.h: For sonar parameter handling.
Notes
newMergeAtt is a foundational tool for achieving high-accuracy multibeam bathymetry by rigorously integrating motion and sound velocity data. Its advanced beam vector recalculation and re-raytracing capabilities are essential for modern multibeam processing workflows. The tool modifies merged files in place, so thorough backups are recommended before processing. The extensive set of options allows for fine-tuning of motion compensation and refraction corrections based on specific survey conditions and sensor configurations. The travis algorithm is an experimental sounding reduction technique.