-
Notifications
You must be signed in to change notification settings - Fork 0
Home
DecoJS is a browser-based, zero-build implementation of the Bühlmann ZH-L16 decompression algorithm with Erik Baker's gradient factors. It runs live at decotheory.eu; the source is on GitHub at matej-hron/decojs.
Developers reading, modifying, or porting the code. This wiki documents the algorithm as implemented — equations with file:line citations, data flow between modules, and the numerical conventions used. The in-app HTML pages (pressure.html, tissue-loading.html, m-values.html, gradient-factors.html) cover the physics for divers — this wiki does not.
For diving-physiology background that this wiki assumes, the most accessible primer is Mark Powell's Deco for Divers — the project's intellectual inspiration; see References §3.
Getting started
- Project-Info — install, run, tests, live demo
- Architecture — module graph and no-build philosophy
Decompression Model (the math as implemented)
- Decompression-Model — overview and notation
- Model-01-Compartments — 16 tissue compartments, variants A/B/C
- Model-02-Haldane-Equation — constant-depth loading
- Model-03-Schreiner-Equation — linear-rate loading
- Model-04-M-Values — Bühlmann critical supersaturation
- Model-05-Gradient-Factors — pAnchor-based GF ramp
Algorithms (how DecoJS simulates a dive)
- Algorithms — overview
- Algo-01-Ascent-Simulation
- Algo-02-NDL-Calculation
- Algo-03-First-Stop-Ramped-GF
- Algo-04-Deco-Stop-Loop
- Algo-05-Multi-Gas-Switching
- Algo-06-Ceiling-Time-Series
Reference
- Module-Reference — per-file API walkthrough
- Validation-and-Testing — 208 tests, decotengu cross-check
- Extending-DecoJS — adding gases, quizzes, variants
- References — bibliography
Start with Architecture to orient — it shows the module graph and the no-build ES-module philosophy. Then read the Decompression Model chapters in order; they build up notation and each equation is cited to source. The Algorithms chapters assume the Model chapters and show how DecoJS stitches the equations into a dive simulation. Module-Reference is lookup-style — go there when you need the signature or line number for a specific function.