Skip to content

mbio: expose Reson 7k3 SonarSettings (record 7000) via new mb_sonarsettings(), surfaced in mblist#1595

Open
epifanio wants to merge 1 commit into
dwcaress:masterfrom
epifanio:expose-reson7k3-sonarsettings
Open

mbio: expose Reson 7k3 SonarSettings (record 7000) via new mb_sonarsettings(), surfaced in mblist#1595
epifanio wants to merge 1 commit into
dwcaress:masterfrom
epifanio:expose-reson7k3-sonarsettings

Conversation

@epifanio

Copy link
Copy Markdown

Summary

The Reson 7k3 reader (mbsys_reson7k3) already parses the 7000 Sonar Settings record, but the only settings reachable through the format-independent API are transmit_gain / pulse_length / receive_gain (via mb_gains). The rest of the recorded settings — frequency, sample rate, transmit pulse width, power & gain selection, absorption, spreading, sound velocity, and tx/rx beamwidths — are needed for backscatter processing (removing the time-varying gain, and applying transmission-loss / insonified-area corrections) but are currently locked in the system-specific struct.

This PR adds a small, purely additive accessor to surface those recorded values, and wires the most useful ones into mblist.

API

mb_sonarsettings() mirrors the existing mb_gains():

  • new function pointer mb_io_sonarsettings in struct mb_ioNULL by default, so formats that don't implement it return MB_ERROR_BAD_SYSTEM and no other format readers are touched;
  • generic wrapper mb_sonarsettings() in mb_access.c (prototype in mb_define.h);
  • implementation mbsys_reson7k3_sonarsettings() returning the recorded 7000 values, registered in mbr_reson7k3.c.

mblist

mb_get_raw() learns about format 89 (Reson 7k3) through mb_sonarsettings(), so the existing raw output codes now work for Reson 7k data:

code value
-O.a mean absorption (dB/km)
-O.r sampling rate (Hz)
-O.L transmit pulse length (µs)

(transmit power and receiver gain are already available via -O.T / -O.t through mb_gains). Man page updated.

Note on proprietary data

This only surfaces values the sonar wrote into the file (the 7000 record MB-System already parses). It applies no vendor gain/TVG model — there is nothing proprietary here.

Testing

  • libmbio and mblist build cleanly.
  • Verified against real R/V Hugh R. Sharp Reson 7125 data (format 89), e.g.:
    $ mblist -I surveyp.mb89 -O"T.a.r.L"
    2015/06/19/19/42/06.160208   44.00   34483    100
    ...
    
    (time, absorption dB/km, sample-rate Hz, pulse-length µs)

Possible follow-ups

The accessor already returns frequency, spreading, sound velocity, and tx/rx beamwidths; these could be surfaced via additional mblist codes, and mb_sonarsettings() could be implemented for other systems that record equivalent settings (e.g. Kongsberg .kmall, Reson 7kr).

The reson7k3 reader already parses the 7000 Sonar Settings record, but the
format-independent API only surfaces transmit_gain/pulse_length/receive_gain
(via mb_gains). The remaining recorded settings - frequency, sample rate,
transmit pulse width, power & gain selection, absorption, spreading, sound
velocity, and tx/rx beamwidths - are needed for backscatter work (removing the
time-varying gain, transmission-loss and insonified-area corrections) but are
locked in the system-specific struct.

API: add an optional accessor mb_sonarsettings() mirroring mb_gains():
  - new function pointer mb_io_sonarsettings in struct mb_io (NULL by default,
    so unsupported formats return MB_ERROR_BAD_SYSTEM - no other readers change);
  - generic wrapper mb_sonarsettings() in mb_access.c (prototype in mb_define.h);
  - implementation mbsys_reson7k3_sonarsettings() returning the recorded 7000
    values, registered in mbr_reson7k3.c.

mblist: teach mb_get_raw() about format 89 (Reson 7k3) via mb_sonarsettings(),
so the existing raw output codes work for Reson 7k data:
  -O.a  mean absorption (dB/km)
  -O.r  sampling rate (Hz)
  -O.L  transmit pulse length (usec)
(transmit power and receiver gain are already available via -O.T/.t / mb_gains).
Man page updated accordingly.

This only surfaces values the sonar wrote into the file; no vendor gain/TVG
model is applied. Builds cleanly (libmbio, mblist); verified against real
Reson 7125 (format 89) data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants