Skip to content

Next Turn: Co-Driver

An iPhone app that calls out each corner before you can see it, the way a rally co-driver reads pace notes, with sat-nav directions in the same voice. It runs on an offline TypeScript pacenote engine that gives byte-identical results on the phone and in the browser. Live on the App Store in the UK.

Period
November 2026 to present
Technologies
TYPESCRIPT, SWIFTUI, JAVASCRIPTCORE, OPENSTREETMAP, OFFLINE-FIRST
View on the App Store (opens in a new tab)

The problem

A sat-nav tells you where to turn, not what the road does next. On a road you don't know, a rally co-driver's pace notes (“70 left tight into right square”) describe each corner before it comes into view.

Next Turn brings that to everyday driving on a phone mounted in the car. It had to keep working without signal, never ask the driver to look at the screen, and never claim more than its inputs support.

My role

Solo project, end to end: the pacenote engine, the SwiftUI iPhone app and a CarPlay app, the offline map pipeline, the road-alert integrations, the co-driver voice packs, and the App Store submission.

What I decided

One engine everywhere. The engine is TypeScript compiled to a single JavaScript file with no runtime dependencies. The iPhone runs it inside JavaScriptCore with JSON in and out; the same file runs in Node and the browser.

Deterministic by rule. The engine may not use clocks, randomness, the network or locale APIs, and every threshold is quantised before it is compared. A guard test enforces this, and golden fixtures must come out byte-identical on V8 and JavaScriptCore.

A defined note format (RNP1) with a strict parser and a 3,000-case round-trip property test, so every call is checkable data before it becomes speech.

Offline maps. UK road tiles are built from OpenStreetMap and published as releases, so the app does not depend on a public map server. A map matcher works out which road you are on, and routing, pace notes and turn-by-turn directions all come from the same road graph. The map extends ahead of you while you drive.

Phone sensors fused with GPS: gyroscope heading, barometer for crests and dips, accelerometer for jumps.

Privacy by design: no account, no ads, no tracking. Your position, routes and drive logs stay on the phone unless you choose to share them.

What I gave up

No speed, braking or gear advice. That needs vehicle and grip calibration, so the engine never produces it, and the app presents itself as a driving aid, not a safety system.

UK only for now, so maps, units, speed limits and road alerts can be right rather than approximate.

Two natural co-driver voices are generated with ElevenLabs and built into the app, so they work offline. Clips are generated once from the engine’s own vocabulary and cached by content hash; any word a pack lacks falls back to an iPhone voice.

How I knew it worked

291 engine tests and 109 Swift tests, plus golden fixtures that must be byte-identical across JavaScript engines.

Benchmarks: map matching chose the right road 98% of the time on a real OpenStreetMap network with 5 m simulated GPS noise; fusing the gyroscope with 1 Hz GPS raised same-grade corner calls from 36% to 90% on synthetic drives; false re-plans on GPS jitter fell from 42 to 2 on the routing bench.

A flight recorder logs every GPS reading, engine answer and spoken cue, and a driver can mark a bad call with one tap. The first real drive found a call that sounded like the wrong direction at a turn; it was fixed and covered by a regression test built from the same junction.

What changed

Live on the App Store as Next Turn: Co-Driver: pace notes and directions in one voice, offline maps, live traffic and arrival time, road closures, roadworks and weather warnings on the route, and the speed limit next to your speed. Free, with no ads and no account.

What I would do next

More real-drive testing across both modes, numbered pace-note styles alongside the descriptive ones, and CarPlay on real cars once Apple grants the navigation entitlement.