deOuterMistrack
Description
deOuterMistrack is a utility designed to detect and flag “mistracked” soundings in the outer portions of multibeam sonar swaths, particularly observed in data from systems like EM2040C and EM712. These mistracks manifest as spurious detections beyond the coherent outer edges of the swath.
The tool identifies regions of the outer swath where Q_factor (quality factor) is -128 (indicating no detection) to determine the effective swath edge, and then flags any detected soundings (!beams[i].status) beyond this edge.
Usage
deOuterMistrack <mergefile(s)> [-v] [-first <ping_num>] [-last <ping_num>]
Arguments
| Option | Description | |
|---|---|---|
<mergefile(s)> | Required. One or more paths to OMG-HDCS merged files to be processed. These files are modified in place. | |
-v | Enable verbose output. | |
-first <ping_num> | Specifies the starting ping number (inclusive) to process. | All pings |
-last <ping_num> | Specifies the ending ping number (inclusive) to process. | All pings |
How It Works
- File Processing: The tool iterates through each provided merged file.
- Summary Header Reading: Reads the summary header for basic file information.
- Ping Iteration: Loops through profiles (pings) from
firsttolast(or all profiles if not specified):- Reads the raw beams for the current ping.
- Determine Swath Edges:
- It defines
outerasno_beams / 8. port_edgestarts atouterand moves inward until a beam withQ_factor != -128is found.stbd_edgestarts atno_beams - outerand moves outward until a beam withQ_factor != -128is found.- These
port_edgeandstbd_edgevalues roughly delineate the coherent edges of the swath.
- It defines
- Flag Mistracks:
- It then iterates from the determined
port_edgeinward towards the center of the swath. If a beamiin this region has!beams[i].status(meaning it’s currently considered valid) it flags it by setting the 5th bit of itsstatusfield (beams[i].status |= 1 << 5;). This marks it as a mistrack. - Similarly, it iterates from the
stbd_edgeoutward and flags valid beams in that region as mistracks.
- It then iterates from the determined
- In-Place Update: The modified
beams(with updatedstatusflags for mistracks) are written back to the merged file for the current ping.
Output Files
The input merged files are modified in-place.
Dependencies
OMG_HDCS_jversion.h: For OMG-HDCS data structures.support.h: For general utility functions and error handling.
Notes
Mistracks in the outer swath can be difficult to automatically filter using traditional slope-based methods because they might not represent sharp discontinuities. This tool uses a heuristic based on the Q_factor to identify these specific artifacts, which are common in newer multibeam systems. The status flag is updated using a bitwise OR, preserving other flags that might already be set.