Home - matej-hron/decojs GitHub Wiki

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.

Who this wiki is for

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.

Contents

Getting started

Decompression Model (the math as implemented)

Algorithms (how DecoJS simulates a dive)

Reference

How to read

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.