Skip to content
matejhron edited this page May 10, 2026 · 3 revisions

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.

Clone this wiki locally