Contents

Deco engine

The decisions that shape your schedule

The judgment calls Bühlmann leaves open: where stops land, how stop times are rounded, how gas switches are chosen, water type and altitude, and how the engine handles CCR, repetitive dives and oxygen breaks.

Last updated 4 Haziran 2026

On this page

What it is

The published Bühlmann algorithm is the easy part. What separates a serious planner from a weekend script is the dozens of decisions the algorithm doesn’t make for you: where to place a stop, how to round it, when to switch gas, and how to treat fresh water. Two engines can agree on the physics and still print different stop lists because of these choices. This page documents the ones Dive Kit makes, because each one changes the schedule you dive.

Where stops land, and how long you hold them

A decompression stop is a depth where you pause to off-gas while staying under the M-value ceiling. Turning a smooth, continuous ascent into a list of fixed stops takes choices:

  • Stops sit on a grid (every 3 m by default) and a ceiling always rounds up, so you are never asked to hold shallower than your true ceiling.
  • The last stop is a real stop, not an afterthought. Mix a coarse grid with a small last-stop depth and a naive tool sends you back to a deeper grid depth. Dive Kit holds at the last stop the way a diver would. The last stop also carries a one-minute minimum, so the final safety hold never vanishes even when little obligation is left at that depth.
  • The last stop ends exactly at your GF-High. Between stops, the engine counts the gas you breathe off while you climb, which is why your first stop can sit shallower than other tools place it (the how Dive Kit compares to MultiDeco page traces this on a deep dive). The last stop is the exception: the engine holds it until your leading tissue can surface within your GF-High limit, and it does not shorten the hold by assuming the swim to the surface will finish the off-gassing. You leave the last stop the moment you are clear to surface, and not before. The length of the last stop does not change when you change the final ascent speed.

Stop rounding: whole-minute, 30-second, and precise modes

The engine works every dive to the second internally. How it shows each stop is a setting:

  • Whole-minute stops (the default) give a clean, followable table: the number you hold on the line, the way a printed deco schedule reads. The engine works each stop out to the second, then rounds it up to a whole minute. The rounding runs inside the engine, not on the screen: it holds each stop in whole-minute steps and only leaves on a minute boundary. The rule for leaving is one-way. It can turn a “leave” into a “hold”, never a “hold” into a “leave”. So a rounded stop lasts at least as long as the exact schedule asked for, you never leave a stop sooner or shallower than the continuous engine allows, and because the engine rounds before it works out the rest of the dive, every downstream number (runtime, the central nervous system oxygen clock CNS, the oxygen tolerance unit clock OTU, and gas) matches the schedule you actually dive.
  • Precise and 30-second modes (opt-in) show the real obligation instead of the rounded table. Precise mode shows each stop to the second in MM'SS" notation: a hold of one minute five seconds reads 1'05" instead of a rounded 2', and a 20-second touch reads 0'20" instead of folding into the next minute. A 30-second mode sits between the two. You pick the mode with the Stop time display control in the deco planner (1s / 30 sec / Minutes, where 1s is the precise mode), and the choice is saved with the plan. See the deco planner page for where the control lives.

Whole minutes are the default because that is the schedule you can dive, and because it is safe: the engine rounds each stop up, never down, so a rounded stop is always at least as long as the exact one. The exact number is still there underneath, and precise mode shows it.

Switching gases on the way up

Richer mixes off-gas faster but turn toxic under pressure, so each gas has a maximum operating depth (MOD) set by its oxygen partial pressure (pO₂).

  • Switch depth is set by the gas’s oxygen content. A lean mix (under 28% O₂) is capped at a PPO₂ of 1.4 bar, a mid mix (28% to under 45%) at 1.5, a rich mix (45% and above) at 1.6. The boundary value takes the higher band: a gas of exactly 28% O₂ counts as mid, and exactly 45% counts as rich. The same cap sets both the switch depth and the hyperoxia warning, so the MOD you see is always the depth the engine switches at. These three numbers are the Max PPO₂ caps in Settings (under pO₂ Limits); set all three equal and you get a plain single-cap model.
  • A gas switch can take time, and that time counts against the old gas. You can set a gas-switch time: a short pause at the switch depth, the way a diver stops to change regulators and confirm the gas. The default is 0 minutes. When you set it, the engine keeps you on the old, leaner gas for that pause, so your tissues keep loading at the old rate. You get no credit for the new gas until you switch to it.
  • A boundary case worth showing. Pure oxygen capped at 1.6 bar lands its MOD exactly on the 6 m last stop in salt water (10.0 m per bar gives 6.0 m, where the PPO₂ is exactly 1.60 bar, right on the cap). The switch sits on a knife edge. In denser water it tips over: in the Red Sea (9.87 m per bar) the same cap gives a MOD of about 5.9 m, just shy of the 6 m stop, and the PPO₂ at 6 m works out to about 1.61 bar, a hair over the cap. Read strictly, the engine would refuse to switch you to oxygen at 6 m, the exact stop oxygen is meant for, and leave you on a leaner gas. Dive Kit allows a small tolerance of about 0.1 m at that boundary so the switch always happens, whether the off-by-a-fraction comes from denser water or from floating-point rounding.

The oxygen exposure these switches drive (the CNS and OTU clocks) is covered in the two-oxygen-clocks section of how it works.

When a plan cannot surface

Some settings ask the model for the impossible: with a lean gas at a 6 m last stop and a low GF High, the tissues at the stop keep absorbing nitrogen toward a level the surfacing gradient never accepts, so the stop would never end. The engine proves this exactly at each stop (the whole hold is known in closed form while you breathe one gas) instead of looping or timing out.

The design decision is to answer rather than refuse: the engine raises GF High to the lowest value that can complete the decompression and computes that schedule, flagged with a critical warning that names both values. Every export records the GF the schedule was actually computed with. If even GF High 100 cannot finish the plan, you get a clear error instead of a schedule. The full story, including the per-depth guarantee thresholds and how the engine proves impossibility without false alarms, is on Impossible plans.

Salt water, fresh water, and altitude

Dive Kit uses a water-type-aware conversion (salt 10.0, fresh 10.3, EN13319 10.08, Red Sea 9.87 m per bar) and a configurable surface pressure for altitude. That factor feeds both the gas-loading and the M-value/ceiling maths, not just one of them. Feeding only one is a subtle but real bug in naive implementations. For the same gauge depth, fresh water sits at slightly lower absolute pressure, so loading and total decompression come out a little less than salt.

Beyond the basic open-circuit dive

The same engine handles dives an open-circuit-only model cannot:

  • Closed-circuit rebreathers (CCR). A rebreather holds a constant oxygen partial pressure (the setpoint). The engine works out the diluent mix that holds that setpoint at every depth step and runs the decompression on the resulting loop mix. It models three stages (a low descent setpoint applied only on the way down, a bottom setpoint for the working dive, and a depth-keyed deco-setpoint schedule for the ascent), caps any setpoint the depth cannot physically achieve, and builds an open-circuit bailout plan from the worst realistic moment. See CCR diving for the full walkthrough.
  • Repetitive dives. A second dive starts with leftover gas still dissolved. The engine carries it across the surface interval: nitrogen and helium keep off-gassing, the CNS clock decays on its half-life, and OTU accumulates as the daily dose it is meant to be. A second 30 m dive an hour after the first comes out much heavier, as it should.
  • Oxygen breaks. Long stretches on high-concentration oxygen run up the CNS clock, and the standard mitigation is an air break. When enabled, the engine inserts breaks on the schedule you choose and models them in full: your fast tissues take a little inert gas back on during the break, and that re-loading carries through the rest of the plan. In rounded mode the break starts on the next whole minute of the stop (the cost is up to about 59 extra seconds on oxygen, which is how a whole-minute table reads anyway); precise mode starts it at the exact second.

Parts of this guide were drafted with AI assistance and may contain mistakes. It's educational, not a substitute for training. Always dive within your certification and verify with your instruments.