Skip to content

dive-math / deco / timeToSurface

Function: timeToSurface() ​

timeToSurface(tissues, depthM, breathing, input): number

Defined in: deco/plan.ts:434

Time to surface from a tissue state, minutes, using the plan's ascent rules. Starts the runtime at 0, so with roundStops the whole-minute boundaries (and the result, by < 1 min) can differ from a plan that reaches this state at a non-integer runtime. Infinity when the required stops exceed MAX_DECO_MINUTES.

Parameters ​

tissues ​

Tissues

depthM ​

number

breathing ​

Breathing

input ​

Omit<PlanInput, "levels">

Returns ​

number

Example ​

ts
timeToSurface(tissues, 30, { kind: 'oc', gas: AIR }, { gfLow: 0.4, gfHigh: 0.85 })

Reference only — verify every fill and dive plan independently.