MBAdv / multibeam_tools

Python-based tools for assessing Kongsberg multibeam echosounder performance
GNU Lesser General Public License v3.0
8 stars 0 forks source link

Swath coverage plotter: accommodate different depth references in .all and .kmall #18

Closed kjerram closed 4 years ago

kjerram commented 4 years ago

EX2000 EM304 SAT files (SIS 5 .kmall) converted to .all are reading 6.8 m shallower than the native .kmall files in the swath coverage plotter; this difference is same as TX array Z offset (6.86 m down) from the mapping system origin (granite block). According to the datagram formats, the .kmall reference point is the mapping system origin (granite block) whereas the .all reference point is the TX array. The coverage plotter is simply using the XYZ88 datagram depths for .all files and MRZ depth datagrams without consideration of the different depth references.

Proposed solution:

As a starting point, reference all coverage data to sea surface, assuming this is used primarily for surface vessels. This ensures an apples-to-apples comparison of achieved coverage versus depth from sea surface, not depth from different references from different file types. This would require parsing the installation parameters datagrams to apply vertical adjustments of [origin to waterline] for .kmall files and [TX array to waterline] for .all files.

For the same reasons, recalculate swath angles using the Z from sea surface and acrosstrack distance. The RX beam angles (e.g., from RRA datagram) are currently used when available; however, the RX angles re RX array are not available for all data, and it is not clear whether Kongsberg uses this angle re RX array or a simple arctan(acrosstrack/depth) for nominal swath angles when applying runtime parameters (e.g., swath angle limits). Update all angle-based filtering in the swath coverage plotter to use simplified, consistent sea-surface-based nominal beam angles for surface vessels. Update figure titles/axes/filenames accordingly.

Once this is addressed, add an option for the user to plot achieved coverage versus depth from other references, namely the mapping system origin (granite block for EX) or TX array, rather than sea surface/waterline. This will be useful for evaluating achieved coverage in the echosounder reference frame for vessels with deep array installations relative to total depth (e.g., SailDrone with a deep keel/gondola operating in relatively shallow water) or underwater vehicles where achieved coverage versus depth from the vehicle is much more meaningful than depth from sea surface.

In any case, the nominal beam angles calculated from arctan(acrosstrack/depth) should be used in place of the parsed angles re RX array (or perhaps an option can be added to select the beam angle reference, if there is lingering uncertainty about how Kongsberg applies angle params; for instance, if an RX array is tilted a few deg like on the FH, are the user's runtime angle params referenced from / applied to the array or to local level plane?).

giumas commented 4 years ago

I agree on the idea of having common reference levels. It would be useful to have also a 'raw' visualization that just shows the apples and the potatoes as they are. That would be handy for debugging among other things.

kjerram commented 4 years ago

Updated with these issues generally resolved; user now has option to select sounding reference (raw, waterline [default], TX array, or SIS origin) and soundings are adjusted by the installation lever arms as appropriate for file format and desired reference. There are small differences remaining (e.g., 0.15 m depth difference in 3000+ m of water for the same EX2000 EM304 data in .all and .kmall format). Because the plotter's lever arm adjustments are applied in a simplified, locally level reference frame (essentially assuming a level vessel), these small lingering differences are likely due to attitude effects in the 'effective' lever arms from the native sounding reference points in each format. These differences are not critical for the purposes of swath coverage tracking, especially in deep water. However, it may be addressed in future work (e.g., swath accuracy plotter), and at a minimum will probably require tracking the attitude-adjusted positions (at ping time) for the TX array Z and active positioning sensor X and Y (in .all format), rather than the simple lever arms in an assumed level orientation.