2.0.4 • Published 2 years ago

nitrox-lab-core v2.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

nitrox-lab-core

npm GitHub Workflow Status

Usage

npm i nitrox-lab-core
import { NitroxLabCore } from 'nitrox-lab-core';

const nx = new NitroxLabCore();

const mod = nx.calcMOD(0.32, 1.4); // 33.75

Settings

  • settings (optional)
    • units (optional) - depth and pressure units (METRIC | IMPERIAL), default: METRIC
    • defaultPpO2Max (optional) - default maximum $O_{2}$ fraction, default: 1.4
    import { NitroxLabCore, Units } from 'nitrox-lab-core';

    const settings = {
        units: Units.METRIC, // optional, METRIC | IMPERIAL
        defaultPpO2Max: 1.4 // optional
    };
    const nx = new NitroxLabCore(settings);

MOD

calcMOD(fO2, ppO2Max);

  • fO2 - $O_{2}$ fraction
  • ppO2Max - maximum $O_{2}$ partial pressure
    const mod = nx.calcMOD(0.32, 1.4); // 33.75

Best mix

calcBestMix(depth, ppO2Max);

  • depth
  • ppO2Max - maximum $O_{2}$ partial pressure
    const bestMix = nx.calcBestMix(30, 1.4); // 0.35

Top off

calcTopOff(options);

  • options
    • currentMix
      • fO2 - current mix $O_{2}$ fraction
      • p - pressure
    • topOffMix
      • fO2 - top off mix $O_{2}$ fraction
  • targetPressure - end pressure
const options = {
    currentMix: {
        fO2: 0.32,
        p: 100
    },
    topOffMix: {
        fO2: 0.21
    },
    targetPressure: 220
};

const topOffResult = nx.calcTopOff(options); // 0.26
2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

1.0.0

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago