Architecture
Welch Race Companion is a Welch Software product: live GT7 LAN HUD with a pace-vs-best track map, rule-based voice engineer (optional Pace coaching vs your session best), Tracks elevation relief, and Sport Mode companion for Android and iPhone.
Modules
- core — Kotlin Multiplatform (JVM / Android / iOS): UDP, Salsa20, packet C parser, session,
TrackMapBuilder, engineer / PaceCoach, tuning, Find PS5, simulator - core.catalog / core.sport — bundled cars (~584), tracks (~122), makers; Sport week models + PSN sanitize
- app — Compose Multiplatform HUD (connect, race, audio-only, setup) + Tracks Layout / Relief card + Android TTS / iOS AVSpeechSynthesizer
- app.gt7 — optional companion client is this Worker’s API (profile / sport week); fail soft
- iosApp — Xcode host that embeds the GtDash framework
- web — PC harness (Ktor + synthetic sim)
- site — this Cloudflare Workers marketing site + companion API
Maps & voice
- HUD map — flat outline; denser Yours/Ours rings; green/red pace ribbon vs this stint’s best; Near crop; live vs-best gap
- Tracks Relief — extruded elevation with low→high tint on catalog detail (not on the race HUD)
- Voice —
InsightEngine+ opt-inPaceCoach→CommsGate→ system TTS. Pace tips compare only to your session-best flying lap
Ports
- Heartbeat to PS5: UDP 33739 (payload
C, packet C / 368 bytes, includes A, B, and~) - Telemetry from PS5: UDP 33740
- Find PS5: last saved IP, then this Wi-Fi
/24unicast scan - Companion API:
GET /api/health,POST /api/events(anonymous product diagnostics, opt-out),/api/racer/:psn,/api/sport/week
Companion vs hot path
UDP telemetry stays on the LAN and never depends on HTTP. Profile Online ID is device-local (no password). Catalogs are bundled offline. Circuit outlines come from a bundled pack with denser flying-lap and on-device learn/save fallback. Companion profile / sport / garage class data uses the GridStats JSON API via a Worker Bearer token. Track and car pictures load from GridStats hosted CDN assets. Player pages are outbound links only.
Hard rules
- Never claim tire wear (not in the GT7 stream).
- Tuning sheets are community approximations with a disclaimer.
- SetupHints are suggestions — never auto-applied.
- Not affiliated with Polyphony Digital or Sony.
Home · GT-GridStats · GitHub