svpSonar
Description
svpSonar is a utility designed to model the distortion of sonar beams resulting from errors in the assumed sound velocity at the transducer. It simulates various multibeam sonar geometries (line arrays, paired inclined arrays, curved faces) and calculates how an error in the surface sound velocity affects the true steering angle, apparent across-track position, and depth of a beam.
This tool is critical for understanding the sensitivity of multibeam systems to sound velocity profile inaccuracies and for quantifying potential depth and position errors. It generates output data that can be plotted to visualize these distortions.
Usage
svpSonar (-elac | -em1000 | -line | -em3000d | -isis | -custom <LUT_file>) -out <output_file> [-actual <val>] [-speed_range <min_error> <max_error> <step_error>] [-angle_range <min_angle> <max_angle> <step_angle>]
Arguments
| Option | Description | |—|—| | (-elac | -em1000 | -line | -em3000d | -isis) | Required. Specifies the sonar array geometry type: * -line: Horizontal line array. * -elac: Paired 30 deg inclined line arrays. * -em3000d: Paired 45 deg inclined line arrays. * -isis: Paired 60 deg inclined line arrays. * -em1000: EM1000-like array. | | -custom <LUT_file> | Uses a custom lookup table file (.Time_LUT, .ACROSS_LUT) for ray tracing (currently commented out). | | -out <output_file> | Required. Path for the output ASCII file containing the distortion data. | | -actual <val> | Actual sound speed (m/s) at the transducer. | 1500.0 (assumed) | | -assumed <val> | Assumed sound speed (m/s) for beam steering. | 1500.0 (default) | | -speed_range <min_error> <max_error> <step_error> | Defines a range of sound speed errors (m/s) to simulate. * min_error: Minimum sound speed error. * max_error: Maximum sound speed error. * step_error: Step size for the sound speed error. | -5.0 5.0 0.5 | | -angle_range <min_angle> <max_angle> <step_angle> | Defines the range of beam angles (degrees) to simulate. * min_angle: Minimum beam angle. * max_angle: Maximum beam angle. * step_angle: Step size for the beam angle. | -75.0 75.0 1.0 | | -roll <val> | Simulates a constant vessel roll (degrees). | 0.0 | | -v | Enable verbose output. | |
How It Works
- Initialization: Parses command-line arguments, setting the sonar
type, sound speed parameters (actual_speed,assumed_speed,min_speed_error,max_speed_error,error_step), and angle range (min_angle,max_angle,angle_step). - Output File Setup: Creates the specified output ASCII file (
-out). Writes header information to the file including the number of speed error steps, default Y ranges, and number of angle steps. - Speed Error Loop: Iterates through
speed_errorvalues frommin_speed_errortomax_speed_errorwitherror_step:- Calculates
actual_speedby addingspeed_errortoassumed_speed. - Writes
actual_speedandassumed_speedto the output file. - Angle Loop: Iterates through
anglevalues (in degrees) frommin_angletomax_anglewithangle_step:- Steering Calculation: Calls
steering()to calculatesteered_angle(the angle the sonar system thinks the beam is steered to), taking into account thetypeof sonar and a simulatedroll. - True Steering Angle: Calculates
true_steered_angleusing Snell’s Law, accounting for theactual_speedandassumed_speed. - Angle Error: Calculates
angle_erroras the difference betweentrue_steered_angleandsteered_angle. - Actual Angle: Calculates
actual_angleby addingangle_errorto the originalangle. - Position Calculation:
- Assumes a
true_slant_rangeof 1.0. - Calculates
apparent_acrossandapparent_depthbased onactual_angle. - Calculates
true_across(based onangle). - Calculates
across_errorastrue_across - apparent_across.
- Assumes a
- Output Data: Writes all calculated values (angles, across-track, depth, and errors) to the output file.
- Steering Calculation: Calls
- Calculates
steering(int type, double roll, double angle)Function:- Calculates the effective steered angle based on the sonar array geometry (
type) and appliedroll. - Different sonar types have different relationships between the physical beam angle, roll, and the final steered angle (e.g., simple sum for line array, or offsetting by fixed angles for inclined paired arrays).
- Calculates the effective steered angle based on the sonar array geometry (
- Cleanup: Closes the output file.
Output Files
<output_file>: An ASCII file containing multiple lines of data. For eachspeed_errorstep, it first printsactual_speedandassumed_speed, followed by a series of lines (one for eachanglestep) containing:angle actual_angle steered_angle angle_error apparent_across apparent_depth true_across across_error
Dependencies
support.h: For general utility functions.j_proj.h: For coordinate projection functions.math.h: For mathematical functions.
Notes
svpSonar is a crucial tool for understanding and quantifying the sensitivity of multibeam sonar measurements to sound velocity profile inaccuracies and potential depth/position errors. It helps in assessing the required accuracy of SVPs and in designing mitigation strategies for survey data acquisition and processing. The model supports various sonar geometries for realistic simulation. The tool creates a new file, preserving the original data.