# @mariuspopovici/rho

> Estimate air density (Rho) based on air temperature, pressure and dew point.

Latest version **0.1.4** (published 2019-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mariuspopovici/rho
pnpm add @mariuspopovici/rho
yarn add @mariuspopovici/rho
bun add @mariuspopovici/rho
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2019-04-28 |
| First published | 2018-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marius Popovici |
| Maintainers | mariuspopovici |
| Keywords | rho, air, density, calculator, air density calculator, air density, cycling |

## Links

- npm: https://www.npmjs.com/package/@mariuspopovici/rho
- Repository: https://github.com/mariuspopovici/rho
- Homepage: https://github.com/mariuspopovici/rho#readme
- Issues: https://github.com/mariuspopovici/rho/issues
- npm.io page: https://npm.io/package/@mariuspopovici/rho

## Recent versions

- 0.1.4 (latest) — 2019-04-28
- 0.1.3 — 2019-04-01
- 0.1.2 — 2019-04-01
- 0.1.1 — 2018-12-21
- 0.1.0 — 2018-12-20

## README

# Rho

A small library which helps estimate air density (rho) based on air temperature, pressure and dew point.

## Installation

    `npm install @mariuspopovici/rho`

## Usage

### Parameters
* __temperature__ Air temperature in degrees Celcius (°C) or Fahrenheit (°F) depending on unit type.
* __air pressure__ Air pressure in hPA or inHg depending on units type
* __dew point__ Air temperature in degrees Celcius (°C) or Fahrenheit (°F) depending on 
* __units of measurement__ Optional, defaults to _metric_. Change to _imperial_ to indicate that inputs are in _imperial_ units of measurement.
* __altitude__ Optional, defaults to 0. Specify altitude to if pressure is measured at sea level.
### Examples

```javascript
    var rho = require('@mariuspopovici/rho');
    // calculate Rho with values expressed in imperial units
    var density = rho(68.9, 30.1, 68.9, 'imperial');
```
    Output should be 1.1984

```javascript
    var rho = require('@mariuspopovici/rho');
    // calculate Rho adjusted for altitude
    var density = rho(29, 1010, 20, 'metric', 2000);
```
    Output should be 0.9402

``` javascript    
    var rho = require('@mariuspopovici/rho');
    // calculate Rho with values expressed in metric units (default)
    var density = rho(20.5, 1019.3, 20.5);
```
    Output should be 1.1984

Result is reported in kg/m<sup>3</sup> and can be optionally converted to lb/ft<sup>3</sup>.

```javascript
    var rho = require('@mariuspopovici/rho');
    // calculate Rho with values expressed in imperial units
    var density = rho(68.9, 30.1, 68.9, 'imperial').toPoundsPerCubicFeet();
```
## Tests

    `npm test`

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

---
_Source: https://npm.io/package/@mariuspopovici/rho · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
