
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@squawk/units
Advanced tools
Aviation-aware unit conversion and formatting utilities. Conversions and formatters for speed, distance, altitude, pressure, temperature, fuel, and angle, plus ISA standard atmosphere calculations and compressible-flow aerodynamics.
Part of the @squawk aviation library suite. See all packages on npm.
npm install @squawk/units
All exports are organized by domain namespace to keep call sites self-documenting:
import {
speed,
distance,
altitude,
pressure,
temperature,
fuel,
angle,
isa,
format,
} from '@squawk/units';
// Speed conversions
const kmh = speed.knotsToKilometersPerHour(250);
// Distance conversions
const meters = distance.nauticalMilesToMeters(5);
// Altitude conversions
const feet = altitude.metersToFeet(3000);
// Pressure conversions and QNH/QFE
const hpa = pressure.inchesOfMercuryToHectopascals(29.92);
const kpa = pressure.hectopascalsToKilopascals(hpa);
const qfe = pressure.qnhToQfe(1013.25, 5280); // Denver elevation
// Temperature conversions
const celsius = temperature.fahrenheitToCelsius(59);
// Fuel conversions (density-aware volume <-> mass)
const jetALbs = fuel.gallonsToPounds(40, fuel.FUEL_DENSITY['Jet A']);
const avgasKg = fuel.litersToKilograms(200, fuel.FUEL_DENSITY['100LL']);
// Angle conversions
const radians = angle.degreesToRadians(45);
// ISA standard atmosphere
const isaTemp = isa.isaTemperatureCelsius(35000);
const tas = isa.trueAirspeedFromCalibratedKt(250, 35000); // CAS to TAS at altitude
const da = isa.densityAltitudeFt(5000, 30); // Pressure altitude + OAT
// Formatting with locale support
const altLabel = format.formatAltitude(3500); // "3,500 ft"
const flLabel = format.formatAltitude(35000); // "FL350"
const speedLabel = format.formatSpeed(0.82, 'mach'); // "M0.82"
const tempLabel = format.formatTemperature(15, 'C', {
showISADeviation: true,
altitudeFt: 0,
}); // "15°C (+0 ISA)"
FAQs
Aviation-aware unit conversion and formatting utilities
The npm package @squawk/units receives a total of 36 weekly downloads. As such, @squawk/units popularity was classified as not popular.
We found that @squawk/units demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.