
Ever wanted a real navigation-system-like view while sim racing? NAVI for SimHub does exactly that: it shows your car's position live on a real-world map - like a GPS navi for your race car.
See it in action: Demo Video on YouTube
GitHub Repo: https://github.com/vgarcia007/simhub-live-map
NAVI for SimHub is a small web app that uses the SimHub JSON API to display the current position of your car on real race tracks like the Nordschleife - rendered on a real map (Leaflet).
It is a proof of concept, currently tested with Forza Motorsport 8, but it should work with every game supported by SimHub that outputs X and Y coordinates.
A Python Flask server acts as a CORS proxy and fetches the telemetry data from the SimHub JSON API. The frontend then displays the car's position in real time on a Leaflet map.
To map in-game coordinates to real GPS positions, at least three reference points are needed per track (more points = better accuracy). A reference point is simply a pair of in-game coordinates and the corresponding GPS coordinates.
Game coordinates and GPS coordinates are not directly comparable. Rotation, translation and different scales need to be accounted for - and that can only be done reliably with an affine transformation based on at least three reference points.
Install the dependencies:
pip install flask requests flask-cors numpy waitress
Start the server:
python app.py
Open localhost:5000 in your browser, edit the settings and enjoy the map!
You don't have to edit JSON files by hand: open http://localhost:5000/helper and use the built-in Mapping Helper to add reference points, adjust the yaw correction and save everything directly.
The project is in an early stage - more tracks and features are planned. Community contributions are very welcome!
Join the discussion on Reddit: Project Update - NAVI for SimHub on r/simracing