ttoabv

2.3.0 • Public • Published

TtoABV-Node.js

A port of Edwin Croissant's TtoABV Arduino Library for Node.js

The TtoABV.js module assumes that an SMT172 temperature sensor is used (0.01 degrees Celsius increments) to collect temperature data and uses an appropriate lookup table. If you use a DS18B20 (0.0625 degrees Celsius increments), please use the TtoABV_DS18B20.js module with a lookup table optimized for that sensor.

examples:

var abv = require('ttoabv'); // when using a smt172 sensor

or

var abv = require('ttoabv/TtoABV_DS18B20'); // when using a ds18b20 sensor

// to calculate the boilingpoint of water

console.log(abv.h2oBoilingPoint(pressure));

// to calculate the azeotrope at a certain pressure

console.log(abv.azeotrope(pressure));

// to calculate the abv of a liquid ethanol/water mixture

// for the ds18b20

console.log(abv.TtoLiquidABV(temperature,pressure));

// for the smt172

console.log(abv.TtoLiquidABV(abv.correctedH2O(temperature,pressure)));

// to calculate the abv of a mixed ethanol/water vapor

// for the ds18b20

console.log(abv.TtoVaporABV(temperature,pressure));

// for the smt172

console.log(abv.TtoVaporABV(abv.correctedAzeo(temperature,pressure)));

/ttoabv/

    Package Sidebar

    Install

    npm i ttoabv

    Weekly Downloads

    5

    Version

    2.3.0

    License

    GPL-3.0-or-later

    Unpacked Size

    72 kB

    Total Files

    5

    Last publish

    Collaborators

    • shinobit