factors top-level constant
Unit of measurement factors using a spherical (non-ellipsoid) earth radius. Keys are the name of the unit, values are the number of that unit in a single radian
Implementation
const factors = <Unit, num>{
Unit.centimeters: earthRadius * 100,
Unit.degrees: earthRadius / 111325,
Unit.feet: earthRadius * 3.28084,
Unit.inches: earthRadius * 39.370,
Unit.kilometers: earthRadius / 1000,
Unit.meters: earthRadius,
Unit.miles: earthRadius / 1609.344,
Unit.millimeters: earthRadius * 1000,
Unit.nauticalmiles: earthRadius / 1852,
Unit.radians: 1,
Unit.yards: earthRadius / 1.0936,
};