soil-sensor-toolbox 0.2.1

A Rust library for processing soil sensor data: TMS4 moisture/VWC and LI-7810 gas flux calculations.
Documentation

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