Skip to content

metersToMiles

metersToMiles(meters): number

Defined in: console-sdk/src/units/index.ts:129

Converts metres to miles with firmware-parity truncation.

Replicates app_motion_metre_to_mile: divide by METERS_PER_MILE, add the firmware’s +0.0005 display bias, then truncate to two decimal places (the firmware’s (uint32_t)(mile * 100) / 100.0f cast). The result matches the two-decimal distance shown on the console.

number

Distance in metres.

number

Distance in miles, truncated to two decimals like the console.

metersToMiles(1609.344); // 1