/** * Utility functions for unit conversion and formatting */ import { QuantitativeValue } from '../types/noaa.js'; /** * Extract numeric value from QuantitativeValue, handling null values */ export declare function extractValue(qv: QuantitativeValue | undefined): number | null; /** * Convert Celsius to Fahrenheit */ export declare function celsiusToFahrenheit(celsius: number): number; /** * Convert Fahrenheit to Celsius */ export declare function fahrenheitToCelsius(fahrenheit: number): number; /** * Convert meters per second to miles per hour */ export declare function mpsToMph(mps: number): number; /** * Convert kilometers per hour to miles per hour */ export declare function kphToMph(kph: number): number; /** * Convert knots to miles per hour */ export declare function knotsToMph(knots: number): number; /** * Convert meters to miles */ export declare function metersToMiles(meters: number): number; /** * Convert meters to feet */ export declare function metersToFeet(meters: number): number; /** * Convert cubic meters per second to cubic feet per second */ export declare function cubicMetersPerSecondToCubicFeetPerSecond(cms: number): number; /** * Convert Pascals to inches of mercury */ export declare function pascalsToInHg(pa: number): number; /** * Convert Pascals to millibars/hectopascals */ export declare function pascalsToMb(pa: number): number; /** * Format temperature with unit */ export declare function formatTemperature(qv: QuantitativeValue | undefined, preferFahrenheit?: boolean): string; /** * Format wind speed with unit */ export declare function formatWindSpeed(qv: QuantitativeValue | undefined): string; /** * Format visibility with unit */ export declare function formatVisibility(qv: QuantitativeValue | undefined): string; /** * Format pressure with unit */ export declare function formatPressure(qv: QuantitativeValue | undefined): string; /** * Format a percentage value */ export declare function formatPercentage(qv: QuantitativeValue | undefined): string; /** * Reduce a bearing in degrees to one of sixteen compass points. */ export declare function windDirectionFromDegrees(deg: number): string; /** * Format wind direction from degrees to cardinal direction */ export declare function formatWindDirection(qv: QuantitativeValue | undefined): string; /** * Format date/time in readable format */ export declare function formatDateTime(isoString: string): string; /** * Format date only */ export declare function formatDate(isoString: string): string; /** * Relative humidity from temperature and dew point, via the Magnus formula. * METAR carries no humidity field; this restores it from the two it does * report. Returns whole percent, clamped to 0-100. */ export declare function relativeHumidityFromDewpoint(tempC: number, dewpC: number): number; //# sourceMappingURL=units.d.ts.map