UNPKG

dive-deco

Version:

A TypeScript implementation of decompression calculation algorithms for scuba diving, featuring Bühlmann ZH-L16C algorithm with gradient factors, gas management, and oxygen toxicity tracking.

52 lines (51 loc) 1.6 kB
import { DecoModel, DiveState } from './decoModel'; import { BuhlmannConfig } from './buhlmannConfig'; import { Supersaturation } from './compartment'; import { AscentRatePerMinute, Cns, Otu, DecoRuntime } from './types'; import { Depth } from './depth'; import { Time } from './time'; import { Gas } from './gas'; export declare class BuhlmannModel extends DecoModel { private configuration; private compartments; private state; private sim; constructor(config?: BuhlmannConfig); static default(): BuhlmannModel; config(): BuhlmannConfig; diveState(): DiveState; record(depth: Depth, time: Time, gas: Gas): void; recordTravel(targetDepth: Depth, time: Time, gas: Gas): void; recordTravelWithRate(targetDepth: Depth, rate: AscentRatePerMinute, gas: Gas): void; ndl(): Time; private fork; ceiling(): Depth; deco(gasMixes: Gas[]): DecoRuntime; private nextDecoAction; private nextSwitchGas; private decoStopDepth; private registerDecoStage; cns(): Cns; otu(): Otu; supersaturation(): { gf99: number; gfSurf: number; }; private leadingComp; supersaturationAll(): Supersaturation[]; tissurePressures(): Array<{ n2: number; he: number; total: number; }>; private createCompartments; private recalculate; private recalculateCompartments; private recalculateOxTox; private recalculateLeadingCompartmentWithGF; private calcMaxSlopedGF; private gfSlopePoint; getCurrentGF(): number; private validateDepth; private clone; }