Skip to main content
Ctrl K

NIST SP 811 & BIPM SI Unit Conversion Engine

Deterministic dimensional analysis and NIST Special Publication 811 / ISO 80000-1 metrological unit conversion library.

1
contributor

Description

Metrological Architecture

nist-sp811-units is a zero-dependency dimensional analysis and physical unit conversion library implementing exact rational and IEEE-754 conversion factors from NIST Special Publication 811 (Guide for the Use of the International System of Units (SI)), the 9th Edition BIPM SI Brochure, and ISO/IEC 80000.

Every unit is modeled by a canonical 7-tuple dimension vector over SI base quantities (L, M, T, I, Theta, N, J) (metre, kilogram, second, ampere, kelvin, mole, candela), preventing invalid cross-dimensional conversions at compile time and runtime.

Supported Physical Domains & Exact Constants

DomainNormative StandardRepresentative Units & Exact Anchors
Length & AreaBIPM SI / NIST SP 811m, nm, au, pc, exact international foot (0.3048 m)
Mass & ForceISO 80000-4kg, u (Dalton), N, dyn, lbf (4.4482216152605 N)
Pressure & StressISO 80000-4Pa, bar, atm (101325 Pa), mmHg, psi
Energy & PowerISO 80000-5J, eV (1.602176634e-19 J), cal_IT (4.1868 J), BTU_IT, kWh
ThermodynamicsITS-90 / ISO 80000-5Affine conversions across K, degC, degF, and degR
Ionizing RadiationICRU / NIST SP 811Bq, Ci, Gy, rad, Sv, rem
Digital InformationIEC 80000-13Decimal SI (kB, MB, GB) and binary IEC (KiB, MiB, GiB) prefixes

Installation & Usage

npm install nist-sp811-units
import { convertUnit, areDimensionallyCompatible } from "nist-sp811-units";

const kpa = convertUnit(1, "atm", "kPa"); // 101.325
const kelvin = convertUnit(98.6, "degF", "K"); // 310.15
console.log(areDimensionallyCompatible("psi", "MPa")); // true

Polyglot Language Bindings

Validated with identical metrological test vectors across JavaScript/TypeScript (npm & JSR), Java 11+ (Maven Central), C99 (ESP-IDF), Swift 5.9, Clojure, and D (DUB).

Keywords
Programming languages
  • JavaScript 47%
  • Java 20%
  • D 13%
  • Swift 6%
  • TypeScript 6%
  • C 5%
  • Clojure 3%
License
</>Source code
Packages

Reference papers

Contributors

Contact person

IA

Islam Ayoub

IA
Islam Ayoub
Lead Scientific Software Engineer
Utilvo
0009-0002-1503-5639

Related software

EU Public-Sector Open-Data & Document Accessibility Observatory

EU

Open-source DCAT-AP v3, 5-Star Open Data, and EN 301 549 / ISO 14289-1 (PDF/UA-1) compliance observatory for European public-sector catalogs.

Updated 2 days ago
1

PDF/UA-1 & ISO 32000 Accessibility Inspector

PD

Zero-dependency ISO 14289-1 (PDF/UA-1) & Matterhorn Protocol structural tag auditor and incremental-update stream inspector.

Updated right now
1