sonar-vision 0.1.0

Sonar/ultrasonic perception pipeline — beam forming, echo detection, spatial mapping
Documentation
  • Coverage
  • 65.38%
    17 out of 26 items documented0 out of 11 items with examples
  • Size
  • Source code size: 11.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 462.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

sonar-vision-rs

Rust port of sonar-vision — sonar/ultrasonic perception pipeline.

Features

  • Pulse generation: configurable frequency, duration, sample rate
  • Echo detection: threshold-based peak detection with minimum separation
  • Beamforming: delay-and-sum across multiple sensors
  • Spatial mapping: convert echoes to 2D/3D coordinates
  • Matched filter: cross-correlation with template pulse
  • SNR computation: signal-to-noise ratio estimation

Usage

use sonar_vision::{generate_pulse, detect_echoes, PulseConfig, build_spatial_map, Echo};

let config = PulseConfig::default();
let pulse = generate_pulse(&config);

// Process return signal
let echoes = detect_echoes(&return_signal, 1_000_000.0, 0.5, 0.0001);
for echo in &echoes {
    println!("Object at {:.2}m (amplitude: {:.2})", echo.distance, echo.amplitude);
}

// Build spatial map from multiple angles
let sweeps = vec![
    (0.0, echoes.clone()),
    (std::f64::consts::PI / 4.0, echoes.clone()),
];
let map = build_spatial_map(&sweeps);

License

MIT