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.

47 lines (46 loc) 1.45 kB
import { Pressure, PartialPressures } from './types'; import { Depth } from './depth'; import { Time } from './time'; import { ZHLParams } from './zhlValues'; import { BuhlmannConfig } from './buhlmannConfig'; export interface Supersaturation { gf99: number; gfSurf: number; } interface RecordData { depth: Depth; time: Time; gas: { inspiredPartialPressures: (depth: Depth, surfacePressure: number) => PartialPressures; }; } export declare class Compartment { no: number; minTolerableAmbPressure: Pressure; heIp: Pressure; n2Ip: Pressure; totalIp: Pressure; mValueRaw: Pressure; mValueCalc: Pressure; params: ZHLParams; private modelConfig; constructor(no: number, params: ZHLParams, modelConfig: BuhlmannConfig); private getAirInspiredPartialPressures; recalculate(record: RecordData, maxGf: number, surfacePressure: number): void; ceiling(): Depth; supersaturation(surfacePressure: number, depth: Depth): Supersaturation; private mValue; private compartmentInertPressure; private compartmentPressureDeltaHaldane; private minTolerableAmbPressureCalc; weightedZhlParams(hePp: Pressure, n2Pp: Pressure): [number, number, number]; private maxGfAdjustedZhlParams; get tissurePressures(): { n2: Pressure; he: Pressure; total: Pressure; }; zhlParams(): ZHLParams; clone(): Compartment; } export {};