soil-sensor-toolbox

Crates.iosoil-sensor-toolbox
lib.rssoil-sensor-toolbox
version0.1.3
created_at2025-07-02 10:55:23.858029+00
updated_at2025-07-02 12:29:47.554976+00
descriptionA Rust library for processing soil moisture data from TMS4 sensors.
homepage
repositoryhttps://github.com/LabSOIL/sensor-toolbox
max_upload_size
id1734947
size2,488,623
Evan Thomas (evanjt)

documentation

README

Soil Sensor Toolbox

VWC (Volumetric Water Content) calculation tool based on myClim R package algorithms.

Installation

Install from source

cargo install --path .

Or install from crates.io (if published)

cargo install soil-sensor-toolbox

Quick Start

Build (for development)

cargo build --release

Run (development)

cargo run -- <input_file> <soil_type>

Run (after installation)

soil-sensor-toolbox <input_file> <soil_type>

Example:

soil-sensor-toolbox data.csv universal
soil-sensor-toolbox data.csv peat

Available soil types:

  • sand
  • loamy_sand_A
  • loamy_sand_B
  • sandy_loam_A
  • sandy_loam_B
  • loam
  • silt_loam
  • peat
  • water
  • universal
  • sand_TMS1
  • loamy_sand_TMS1
  • silt_loam_TMS1

Input Format

Direct from the TMS4 sensor:

0;2023.05.30 06:45;4;22.25;22.25;22.5;354;202;0;
1;2023.05.30 07:00;4;21.75;22;22.125;353;202;0;
2;2023.05.30 07:15;4;21.125;21.5;21.375;351;202;0;
...

Output

Creates output.csv with VWC calculations.

Tests

First you will need to generate the test data:

cd ./tests/fixtures
./generate_r_data.sh

This will generate the output files with VWC for each soil type from the R script myClim.

Then run the tests:

cargo test
Commit count: 0

cargo fmt