beam_foot: Multibeam Swath Geometry & Beam Footprint Specification I/O
Overview & Purpose
beam_foot (beam_foot.c / beam_foot.h) defines the BeamFoot data structure and ASCII configuration file parser/writer used to describe the nominal angular geometry, beam spacing mode, multi-ping/multi-sector transmit offsets, and per-beam across-track and along-track beamwidths of a multibeam echosounder. Written by John Hughes Clarke in September 1996, it supports both single-sector (or multi-ping interleaved) sonars and modern multi-sector yaw/pitch-stabilized multibeams (up to 20 sectors and 1,440 beams).
Key Constants & Data Structures
Beam Spacing Mode Constants
#define SG_EQUIANGULAR 1 /* Equiangular beam spacing */
#define SG_EQUIDISTANT -1 /* Equidistant across-track beam spacing */
#define SG_BOOM 0 /* Vertical boom sweep system (e.g., ROSS Sweep) */
#define SG_MULTISECTOR_EA 2 /* Multi-sector equiangular mode */
#define SG_MULTISECTOR_EDBS -2 /* Multi-sector equidistant beam spacing */
BeamFoot Structure
typedef struct {
char *toolType; /* Sonar model name string */
char *operatingMode; /* Operating mode description string */
float shot_interval; /* Ping repetition interval (seconds) */
int spacing_type; /* 1: equiangular, -1: equidistant, 0: boom */
int nobeams; /* Total beams (0 indicates new multi-sector format) */
int nopings; /* Number of pings per swath cycle */
int interleave; /* Interleaved ping flag */
float ping_offset[14]; /* Along-track/pitch offset per ping */
float beamangle[1440]; /* Depression/launch angle per beam (degrees) */
float beamwidth[1440]; /* Across-track 3dB beamwidth per beam (degrees) */
float beamheight[1440]; /* Along-track 3dB beamwidth per beam (degrees) */
float offset_dirn[1440]; /* Azimuthal/steering direction offset per beam */
/* Multi-sector specification (used when nobeams == 0 in file) */
int nosectors; /* Number of transmit sectors (up to 20) */
int sector_nobeams[20]; /* Number of beams in each sector */
float sector_Tx_shift[20]; /* Transmit along-track tilt/shift per sector */
float sector_port_angle[20]; /* Port angular boundary of sector */
float sector_stbd_angle[20]; /* Starboard angular boundary of sector */
float sector_beamangle[20][1440]; /* Launch angle per sector and beam */
float sector_beamwidth[20][1440]; /* Across-track beamwidth per sector and beam */
float sector_beamheight[20][1440];/* Along-track beamwidth per sector and beam */
} BeamFoot;
Public Functions & Signatures
void load_BF_characteristics(char *name, BeamFoot *bf)
Reads a beam footprint specification file from path name into *bf.
- Parameters:
name: Path to the ASCII beam footprint specification file.bf: Pointer to theBeamFootstructure to populate.
- File Format & Parsing Logic:
- Reads two newline-terminated header lines into dynamically allocated strings
bf->toolTypeandbf->operatingMode. - Reads
bf->shot_interval(float),bf->spacing_type(int), andbf->nobeams(int). - Multi-Sector Branch (
bf->nobeams == 0): Readsbf->nosectorsand setsbf->nopings = 1. For each sectorj, readssector_nobeams[j],sector_Tx_shift[j],sector_port_angle[j], andsector_stbd_angle[j], followed bysector_nobeams[j]lines of(beam_index, sector_beamangle[j][i], sector_beamwidth[j][i], sector_beamheight[j][i]). - Single-Sector / Multi-Ping Branch (
bf->nobeams > 0): Readsbf->nopings, setsbf->nosectors = 1, readsnopingspairs of(ping_index, ping_offset[j]), and then readsnobeamslines of(beam_index, beamangle[i], beamwidth[i], beamheight[i], offset_dirn[i]).
- Reads two newline-terminated header lines into dynamically allocated strings
void dump_BF_characteristics(char *name, BeamFoot *bf)
Writes a BeamFoot structure *bf out to an ASCII specification file at path name using the exact symmetric format expected by load_BF_characteristics (automatically branching on bf->nobeams == 0 for multi-sector vs. single-sector output).
How It Fits Into the OMG Architecture
beam_foot provides the geometric beam footprint models used across OMG simulation, plotting, and bottom-detection analysis tools:
makeFoot&downHill(code/plot/makeFoot.c,code/plot/downHill.c): Generates and visualizes projected 3D beam footprints on sloped seafloors.plotBP(code/plot/plotBP.c): Synthesizes theoretical beam footprint files directly frombP_stuffarray models and exports them viadump_BF_characteristics.synSwath(code/gl/SYN_global.h) &swathed(code/SE/bdi_funcs.c): LoadsBeamFootmodels viaload_BF_characteristicsto simulate multibeam swath coverage and evaluate bottom-detection footprints.