plotFoot
Description
plotFoot is a specialized plotting utility designed to visualize multibeam sonar beam footprints on the seafloor. It reads beam footprint characteristics from a file (likely generated by makeFoot.c), simulates a vessel’s movement, and then plots the projected shape and coverage of each beam at a specified water depth.
This tool is invaluable for understanding sonar coverage patterns, especially for interleaved pings, and for assessing how different survey parameters (depth, speed, ping rate) affect the overall mapping efficiency and data density.
Usage
plotFoot -infile <bf_file> [-outfile <filename.meta>] [-size <dx> <dy>] [-depth <val>] [-speed <val>] [-reprate <val>] [-boxsize <val>] [-interleave]
Arguments
| Option | Description | |
|---|---|---|
-infile <bf_file> | Required. Specifies the input beam footprint file (e.g., generated by makeFoot.c). | |
-outfile <filename.meta> | Specifies the output PostScript metafile name. | plot.meta |
-size <dx> <dy> | Specifies the plot size in centimeters. | 19.0 19.0 |
-depth <val> | Specifies the water depth for the simulation. | 100.0 |
-speed <val> | Specifies the vessel speed in knots. | 10.0 |
-reprate <val> | Specifies the shot interval (repetition rate) in seconds. | 1.0 |
-boxsize <val> | Defines the size of the square plotting area (in meters). | 1000.0 |
-interleave | Indicates that the ping sequence is interleaved. |
Input File Format (bf_file)
The input file is an ASCII file assumed to contain:
toolType(string): Sonar tool type.operatingMode(string): Sonar operating mode.shot_interval(float): Sonar ping interval.spacing_type(int): Beam spacing type (1: equiangular, -1: equidistant).nobeams(int): Number of beams.nopings(int): Number of interleaved pings.ping_offset[j](float): Offset for each pingj.- For each beam
i:beamangle[i],beamwidth[i],beamheight[i],offset_dirn[i](float, float, float, float).
How It Works
- Initialization: Parses command-line arguments to set plotting options, input file name, plot size, and simulation parameters (depth, speed, shot interval, box size, interleave flag).
- Plot Setup: Initializes the
plotlibPostScript output (plot.meta). Sets up the overall plot dimensions (xlength,ylength,xoff). - Beam Footprint Data Loading:
- Opens the input beam footprint file (
-infile). - Reads
toolType,operatingMode,spacing_type,nobeams,nopings,ping_offset, and arraysbeamangle,beamwidth,beamheight,offset_dirnfor each beam.
- Opens the input beam footprint file (
- Beam Corner Calculation:
- For each beam
kand each interleaved pingj:- Calculates the
resultant_angleconsideringbeamangle[k]andping_offset[j]. - Determines the
xval(across-track distance) at the edge of the beam, accounting forbeamheight[k]. - Calculates
beam_corner[k][j][0]andbeam_corner[k][j][2](across-track distances for the beam’s edges) andbeam_corner[k][j][1]andbeam_corner[k][j][3](ranges for the beam’s edges). - Tracks
maxrangefor scaling.
- Calculates the
- For each beam
- Plot Header Information: Adds text annotations to the plot displaying sonar type, operating mode, water depth, vessel velocity, beam widths, and repetition rates.
- Beam Footprint Plotting Loop:
- Calculates
noshots(number of pings to simulate over theboxsize). - For each simulated shot
iand each interleaved pingj:- Calculates
yval(along-track distance) based on vessel speed and ping interval. - If the ping is one of a specific set (every 20th, or every 10th and 11th):
- Plots a polygon representing the footprint of each beam
kusing the pre-calculatedbeam_cornercoordinates.
- Plots a polygon representing the footprint of each beam
- Otherwise (for other pings):
- Plots a simple cross for the center of each beam.
- Calculates
- Calculates
- Cleanup: Calls
plot_closeto finalize the PostScript output.
Output Files
<outfile_name>: A PostScript metafile (.meta) containing a visual representation of the sonar beam footprints.
Dependencies
plotlib.h: Forplotlibfunctions.support.h: For general utility functions.BeamFoot.h: ForBeamFootstructure and related functions.math.h: For mathematical functions.
Notes
plotFoot is a valuable tool for survey planning and understanding sonar coverage. It visually demonstrates how parameters like water depth, vessel speed, and ping rate influence the effective coverage of a multibeam system, especially for systems with interleaved ping patterns. This can help optimize survey efficiency and data density.