npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nitrox-calc

v1.0.2

Published

Enriched Air Nitrox calculator

Downloads

13

Readme

Nitrox Calc

Enriched Air Nitrox calculator module

Latest Version on NPM Berlin Software License

Feature

  • Atmospheres absolute of pressure (ATA)
  • Maximum operating depth (MOD)
  • Fraction of Oxygen (FO2)
  • Fraction of Nitrogen (FN2)
  • Best EAN Mix
  • Equivalent air depth (EAD)
  • Actual partial pressure Oxygen

Install

npm i nitrox-calc

Using CommonJS

const Nitrox = require('nitrox-calc')

Using ES6 modules

import Nitrox from 'nitrox-calc'

Usage

Atmospheres absolute of pressure (ATA)

Atmosphere absolute of pressure (ATA) is the atmospheric pressure at sea level.

Return the ATA for a given depth expressed in meter

Syntax

Nitrox.ata(depth)

Example

Nitrox.ata(22)

Maximum operating depth (MOD)

The Maximum Operating Depth (MOD) is the maximum safe depth at which a given nitrox mixture can be used. MOD depends on the allowed partial pressure of oxygen (ppO2), which is related to exposure time and the acceptable risk assumed for central nervous system oxygen toxicity.

Return the Maximum operating depth (MOD) for a given Partial Pressure of Oxygen (ppO2) and Enriched Air Mix (EAN)

Syntax

Nitrox.mod(ppO2,EAN)

Example

Nitrox.mod(1.4,32)

Fraction of Oxygen (FO2)

The Fraction of Oxygen (FO2) contained in a Nitrox Mix

Return the Fraction of Oxygen (FO2) for a given Enriched Air Mix (EAN)

Syntax

Nitrox.fo2(EAN)

Example

Nitrox.fo2(32)

Fraction of Nitrogen

The Fraction of Nitrogen (FN2) contained in a Nitrox Mix

Return the Fraction of Nitrogen (FN2) for a given Enriched Air Mix (EAN)

Syntax

Nitrox.fn2(EAN)

Example

Nitrox.fn2(32)

Enriched Air Percentage

The Enriched Air Percentage (EAN) contained in a Mix

Return the Enriched Air Mix (EAN) for a given Fraction of Oxygen (FO2)

Syntax

Nitrox.ean(FO2)

Example

Nitrox.ean(0.32)

Best mix

The composition of a nitrox mix can be optimized for a given planned dive profile. This is termed "Best mix", for the dive, and provides the maximum no-decompression time compatible with acceptable oxygen exposure.

Return the Best Mix (BM) for a given Partial Pressure of Oxygen (ppO2) and a depth (ATA)

Syntax

Nitrox.bestMix(ppO2, ATA)

Example

Nitrox.bestMix(1.4,32)

Equivalent air depth (EAD)

The equivalent air depth for a given nitrox mix and depth is the depth of a dive when breathing air that would have the same partial pressure of nitrogen.

Return the equivalent air depth (EAD) for a given depth expressed in meter and Fraction of Nitrogen (FN2)

Syntax

Nitrox.ead(Depth,FN2)

Example

Nitrox.ead(10,0.68)

Actual partial pressure of Oxygen

The Actual partial pressure of Oxygen increase with depth

Return the actual partial pressure Oxygen (ppO2) for a given depth and Fraction of Oxygen (FO2)

Syntax

Nitrox.appO2(ATA,FO2)

Example

Nitrox.appO2(2,0.32)

Examples

List of sample usage

Tests

Tested with Jest, check the tests

Warning

The calculations produced by this application should only be used by Nitrox divers certified by a recognized SCUBA Diving training.

This calculator provides information about gas use in scuba diving. UNDER NO CIRCUMSTANCES is there any implication that any gas mixture is safe or even life supporting at any depth. If you have not recived training in technical scuba diving, Nitrox, Trimix or Heliox you should not attempt to use any of these results. Improper use of gasses in diving can result in injury or DEATH.