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.

58 lines (57 loc) 1.39 kB
import { Depth } from './depth'; import { Gas } from './gas'; import { Time } from './time'; export type Pressure = number; export type DepthType = number; export type GradientFactor = number; export type GradientFactors = [number, number]; export type MbarPressure = number; export type AscentRatePerMinute = number; export type Cns = number; export type Otu = number; export declare enum NDLType { Actual = "Actual",// take into consideration off-gassing during ascent ByCeiling = "ByCeiling" } export declare enum CeilingType { Actual = "Actual", Adaptive = "Adaptive" } export declare enum Units { Metric = "Metric", Imperial = "Imperial" } export declare enum DecoStageType { Ascent = "Ascent", DecoStop = "DecoStop", GasSwitch = "GasSwitch" } export declare enum InertGas { Helium = "Helium", Nitrogen = "Nitrogen" } export interface PartialPressures { o2: Pressure; n2: Pressure; he: Pressure; } export interface ConfigValidationError { field: string; reason: string; } export interface DecoStage { stageType: DecoStageType; startDepth: Depth; endDepth: Depth; duration: Time; gas: Gas; } export interface DecoRuntime { decoStages: DecoStage[]; tts: Time; ttsSurface: Time; sim: boolean; } export declare class DecoCalculationError extends Error { constructor(message: string); }