dive-deco 0.2.0

A dive decompression models library (Buehlmann ZH-L 16C)
Documentation

dive-deco

A dive decompression models library.

Buehlmann ZH-L16C

The Bühlmann decompression set of parameters is an Haldanian mathematical model (algorithm) of the way in which inert gases enter and leave the human body as the ambient pressure changes. Versions are used to create Bühlmann decompression tables and in personal dive computers to compute no-decompression limits and decompression schedules for dives in real-time.^1

Features

  • step-by-step decompression model (ZH-L16C params version) calculations using depth, time and used gas
  • current NDL (no-decompression limit)
  • current decompression ceiling
  • current gradient factors
    • current gradient factor (the raw percentage of the Bühlmann allowable supersaturation at the current depth, i.e. super-saturation percent gradient, a.k.a GF99)
    • surface gradient factor (the surfacing gradient factor, i.e. super-saturation percentage gradient relative to the surface)

Planned features

  • gradient factors settings (currently working effectively as GF 100/100)
  • helium support
  • deco model config (GF, water density, metric/imprial units, surface ambient pressure)
  • optimizations

Examples

NDL (no-decompression limit)

use dive_deco::{DecoModel, BuehlmannModel, Gas};

fn main() {
    // initialize a Buehlmann ZHL-16C deco model
    let mut model = BuehlmannModel::new();

    let air = Gas::new(0.21, 0.);
    let depth = 30.;
    let bottom_time_minutes = 10;

    // a simulated instantaneous drop to 20m with 20 minutes bottom time using air
    model.step(&depth, &(bottom_time_minutes * 60), &air);

    // print NDL
    println!("NDL: {} min", model.ndl()); // output: NDL: 5 min
}

References

:warning: Disclaimer: Not Suitable for Dive Planning, Work-in-Progress Model This language model is currently in a developmental stage and should be treated as a work in progress. Users are advised that the information generated by this model may not be accurate and could contain errors. It is important to exercise caution and verify any critical information provided by the model through alternative sources. This model is not designed or intended to be used as a dive planning software. Diving involves inherent risks, and accurate planning is crucial for safety. Users are strongly advised to rely on specialized dive planning software and consult with certified dive professionals for accurate and reliable information related to diving activities. By using this model, users acknowledge that it is not a substitute for professional advice or dedicated tools designed for specific tasks, and the developers take no responsibility for any consequences arising from the use of information generated by this model.