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 ping j.
  • For each beam i: beamangle[i], beamwidth[i], beamheight[i], offset_dirn[i] (float, float, float, float).

How It Works

  1. 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).
  2. Plot Setup: Initializes the plotlib PostScript output (plot.meta). Sets up the overall plot dimensions (xlength, ylength, xoff).
  3. Beam Footprint Data Loading:
    • Opens the input beam footprint file (-infile).
    • Reads toolType, operatingMode, spacing_type, nobeams, nopings, ping_offset, and arrays beamangle, beamwidth, beamheight, offset_dirn for each beam.
  4. Beam Corner Calculation:
    • For each beam k and each interleaved ping j:
      • Calculates the resultant_angle considering beamangle[k] and ping_offset[j].
      • Determines the xval (across-track distance) at the edge of the beam, accounting for beamheight[k].
      • Calculates beam_corner[k][j][0] and beam_corner[k][j][2] (across-track distances for the beam’s edges) and beam_corner[k][j][1] and beam_corner[k][j][3] (ranges for the beam’s edges).
      • Tracks maxrange for scaling.
  5. Plot Header Information: Adds text annotations to the plot displaying sonar type, operating mode, water depth, vessel velocity, beam widths, and repetition rates.
  6. Beam Footprint Plotting Loop:
    • Calculates noshots (number of pings to simulate over the boxsize).
    • For each simulated shot i and each interleaved ping j:
      • 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 k using the pre-calculated beam_corner coordinates.
      • Otherwise (for other pings):
        • Plots a simple cross for the center of each beam.
  7. Cleanup: Calls plot_close to finalize the PostScript output.

Output Files

  • <outfile_name>: A PostScript metafile (.meta) containing a visual representation of the sonar beam footprints.

Dependencies

  • plotlib.h: For plotlib functions.
  • support.h: For general utility functions.
  • BeamFoot.h: For BeamFoot structure 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.