mbio: expose Reson 7k3 SonarSettings (record 7000) via new mb_sonarsettings(), surfaced in mblist#1595
Open
epifanio wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Reson 7k3 reader (
mbsys_reson7k3) already parses the 7000 Sonar Settings record, but the only settings reachable through the format-independent API aretransmit_gain/pulse_length/receive_gain(viamb_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 existingmb_gains():mb_io_sonarsettingsinstruct mb_io— NULL by default, so formats that don't implement it returnMB_ERROR_BAD_SYSTEMand no other format readers are touched;mb_sonarsettings()inmb_access.c(prototype inmb_define.h);mbsys_reson7k3_sonarsettings()returning the recorded 7000 values, registered inmbr_reson7k3.c.mblist
mb_get_raw()learns about format 89 (Reson 7k3) throughmb_sonarsettings(), so the existing raw output codes now work for Reson 7k data:-O.a-O.r-O.L(transmit power and receiver gain are already available via
-O.T/-O.tthroughmb_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
libmbioandmblistbuild cleanly.Possible follow-ups
The accessor already returns frequency, spreading, sound velocity, and tx/rx beamwidths; these could be surfaced via additional
mblistcodes, andmb_sonarsettings()could be implemented for other systems that record equivalent settings (e.g. Kongsberg.kmall, Reson 7kr).