glf

Crates.ioglf
lib.rsglf
version0.2.1
sourcesrc
created_at2024-06-10 11:14:11.993562
updated_at2024-06-10 11:19:48.61026
descriptionA Rust Library to read the GLF files produced by the Tritech Sonar.
homepagehttps://github.com/onidaito/glf
repositoryhttps://github.com/onidaito/glf
max_upload_size
id1266960
size32,775
Benjamin Blundell (OniDaito)

documentation

README

glf

A rust crate for reading GLF Files from Tritech Sonar.

Documentation

Documentation is available at https://docs.rs/glf/0.2.0/glf/.

Building

To build this crate, run:

cargo build

Usage

use std::path::Path;
use glf::GLF;

let glf = GLF::new(Path::new("./pytritech_testdata/test_tritech.glf")).unwrap();
println!("GLF Image 0: {}", glf.images[0].header.time);
let img = glf.extract_image(1).unwrap();
img.save("test.png").unwrap();

Testing

To test the crate, you'll need to download a submodule that contains the test data. It's a little large and so isn't included in the basic install. To perform a full checkout of this repository you can run:

git clone --recurse-submodules https://github.com/onidaito/glf

Or, if you've already checked out

git submodule update --init --recursive

From then on, one can run the usual cargo command:

cargo test
Commit count: 5

cargo fmt