Skip to main content

Kongsberg "KMALL" file reader

Modern Kongsberg multi-beam echo sounders, which acquire data using "Seafloor Information System (SIS) - Version 5" produce data files in the ".kmall" data format. This module (class) and utility reads and writes this data format and provides several tools for reporting information about the data within the file. The kmall.py utility can dump the soundings to ASCII text, verify the contents of the kmall file, use any of several smart (experimental) methods to compress (and decompress) the files, extract runtime parameters (sonar acquisition settings) and pinginfo records (metadata about each ping).

Although low-level readers for many of the datagram types is in place, little other infrastucture exists. This reader remains a work in progress.

./kmall.py -h
usage: kmall.py [-h] [-f KMALL_FILENAME] [-d KMALL_DIRECTORY] [-p] [-V] [-z] [-l COMPRESSIONLEVEL] [-Z] [-r] [-s] [-S] [-i] [-ii EXTRACTPINGINFO_II]
                [-o OUTPUTDIRECTORY] [-D DECIMATIONINTERVAL] [-v]

A python script (and class) for parsing Kongsberg KMALL data files.

options:
-h, --help            show this help message and exit
-f KMALL_FILENAME     The path and filename to parse.
-d KMALL_DIRECTORY    A directory containing kmall data files to parse.
-p                    Print Latitude, Longitude, Depth
-V                    Perform series of checks to verify the kmall file.
-z                    Create a compressed (somewhat lossy) version of the file. See -l
-l COMPRESSIONLEVEL   Set the compression level (Default: 0). 0: Somewhat lossy compression of soundings and imagery data.(Default) 1: Somewhat lossy compression
                        of soundings with imagery omitted.
-Z                    Decompress a file compressed with this library. Files must end in .Lz, where L is an integer indicating the compression level (set by -l
                        when compresssing)
-r                    Extract runtime parameters from file or directory of files.
-s                    Extract sensor position data from file or directory of files.
-S                    Extract statistics from file or directory of files.
-i                    Extract all pinginfo records from a file to stdout.
-ii EXTRACTPINGINFO_II
                        -ii <interval> Extracts pinginfo at <interval> seconds.
-o OUTPUTDIRECTORY    -o <directory> Write extracted pinginfo, runtime parameter and sensor position files to <directory>. The directory is created if it does
                        not exist. (Default: the current working directory.)
-D DECIMATIONINTERVAL
                        Set the decimation level where 1=write every other ping (Default 1). The output file is written in the executed directory appended with Dd,
                        where D is the specified decimation level.
-v                    Increasingly verbose output (e.g. -v -vv -vvv),for debugging use -vvv 

See the examples for details about using the module.

Coordinate systems

Vessel Coordinate System (VCS)

Origin of the VCS is the vessel reference point. The VCS is defined according to the right hand rule.

x-axis pointing forward parallel to the vessel main axis.
y-axis pointing starboard parallel to the deck plane.
z-axis pointing down parallel to the mast.

Rotation of the vessel coordinate system around an axis is defined as positive in the clockwise direction, also according to the right hand rule.

Roll - rotation around the x-axis. (positive when starboard is down)
Pitch - rotation around the y-axis. (positive when bow is up)
Heading - rotation around the z-axis. Heading as input in depth calculations is sensor data referred to true north. (positive is clockwise when looking down, like traditional heading)

Array Coordinate System (ACS)

Origin of the ACS is at the centre of the array face. The ACS is defined according to the right hand rule.

x-axis pointing forward along the array (parallel to the vessel main axis).
y-axis pointing starboard along the array plane.
z-axis pointing down orthogonal to the array plane.

Surface Coordinate System (SCS)

Origin of the SCS is the vessel reference point at the time of transmission. The SCS is defined according to the right hand rule.

x-axis pointing forward along the horizontal projection of the vessel main axis.
y-axis pointing horizontally to starboard, orthogonal to the horizontal projection of the vessel main axis.
z-axis pointing down along the g-vector.

To move SCS into the waterline, use reference point height corrected for roll and pitch at the time of transmission.

Fixed Coordinate System (FCS)

Origin of the FCS is fixed somewhere in the nominal sea surface. The FCS is defined according to the right hand rule.

x-axis pointing north.
y-axis pointing east.
z-axis pointing down along the g-vector.

Written with StackEdit.

Metadata

Release files for pykmall 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykmall 1.1.2
File Size Uploaded Provenance Actions
pykmall-1.1.2.tar.gz 55.1 kB Without provenance Details for pykmall-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pykmall 1.1.2
File Interpreter ABI Platform Actions
pykmall-1.1.2-py3-none-any.whl Python 3 none any Details for pykmall-1.1.2-py3-none-any.whl

Total release size: 111.2 kB

Release files / pykmall-1.1.2.tar.gz

Download URL pykmall-1.1.2.tar.gz
Size 55.1 kB
Tags Source
SHA-256 checksum
How to use checksums
73ae1614914663c293eb01921d03514af7cfe6ad027fc851d8b42c1e634b9b70
BLAKE2b-256 checksum
How to use checksums
81e8b3806796c8e4261e62097eee25116fc13c475a041069aa3b70a9900a9b93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / pykmall-1.1.2-py3-none-any.whl

Download URL pykmall-1.1.2-py3-none-any.whl
Size 56.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69c6b4147b1741988d360e880187442257f197b83aac000bdcb5393e44ccd7c6
BLAKE2b-256 checksum
How to use checksums
fc2dc65a92e26f66ee1142f0113e0b4a43814e3807ea4681642fd945b4bcadc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for pykmall 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page