Skip to content

Default to metric (km/h) units - #5

Merged
restlessankyyy merged 2 commits into
mainfrom
feat/default-metric-units
Jun 23, 2026
Merged

Default to metric (km/h) units#5
restlessankyyy merged 2 commits into
mainfrom
feat/default-metric-units

Conversation

@restlessankyyy

@restlessankyyy restlessankyyy commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

Switches the backend's default speed unit to metric so the dashboard shows km/h out of the box, and refreshes the docs screenshot to match.

  • backend/src/config.ts: primaryUnit now defaults to kph (was mph) when PRIMARY_UNIT is unset. This is the local-dev / simulator path.
  • docs/images/dashboard.png: replaced with a fresh simulator capture showing km/h and km (est. range), so the README image reflects the metric default.

Why

The deployed Container App already sets PRIMARY_UNIT=kmh via Terraform, so production was already metric. Local development (simulator, no env var) fell back to mph, which was inconsistent with the deployed experience. The iOS app treats both kph and kmh as metric, so this aligns local and cloud on km/h.

Architecture impact

None. A default-value change plus a documentation image refresh; no components, data flows, message contracts (VehicleState), data sources, or infra/ resources changed.

Testing

  • npx tsc --noEmit passes on the backend.
  • Ran the simulator backend (SOURCE=simulator) and confirmed the stream emits primaryUnit: kph.
  • Verified in the iOS simulator that the dashboard renders km/h and km (the new screenshot is that capture).

Local dev (no PRIMARY_UNIT env) now defaults to metric (km/h) instead
of mph, matching the deployed config which already sets PRIMARY_UNIT=kmh.
The iOS app treats both kph and kmh as metric.
@restlessankyyy
restlessankyyy merged commit fdef8ce into main Jun 23, 2026
2 checks passed
@restlessankyyy
restlessankyyy deleted the feat/default-metric-units branch June 23, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant