Cycling Simulator 🚵‍♂️

Date: 28.07.2020

Indoor cycling can become quite boring after several sessions as there is no connection to the real world. The cycling training is purely simulated and the data (speed and power) have no physical connection.

On the other hand, when cycling outdoor, most cyclists track their rides, e.g on Strava. These tracks contain geocoordinates as well as information about the altitude. The goal is to combine the data collected during an indoor session and project them in a real-world cycling track.

The simulator can be found (and tested): https://brakid-cycling-simulator.herokuapp.com/ (requires Chrome 70+ and a BLE-enabled Speed and Cadence Sensor

How does the simulator work?

To project the indoor ride onto a previously made ride on the real-world, we need to read the sensor mounted on the bike. Currently the simulator supports BLE Speed and Cadence sensors only.

The webapp connects to the sensor and reads the speed and cadence values.

As the speed measured by the indoor ride cannot be projected to the outdoor track (due to the resistance of the indoor trainer used and the grade to ride outdoors), we need to convert the speed that was reached indoor to the power that was exerted.

This conversion can be done for indoor-trainers as they have a speed-resistance curve. The one that is used in this simulator is:

Elite Novemag 8 Power Curve Elite Novemag 8 Power Curve - taken from https://www.powercurvesensor.com

Based on the power that was exerted and the detail of the track to simulate (the grade up- or downhill) as well as information about the cyclist (height, weight and bike weight), we can estimate the speed the cyclist would achieve for a gived wattage.

The formula used is described: https://www.gribble.org/cycling/power_v_speed.html

The speed then is used to track how far the user would have proceeded on the simulated track. This allows us to get the position where the cyclist would be in real life and we can display it on a map.

Simulator screenshot

After completing a simulated ride, the user then can export the ride as a GPX file and upload it to Strava or others.

Unlike as on Zwift, where a limited set of rides is available ony, this simulator can work with any track. It works with all GPX-files. E.g you can simply export your previous rides from Strava as GPX-files and use them on our simulator.

Potential extensions

If you want to give it a try, connect your Speed sensor, load your favorite ride and challenge yourself of your indoor trainer to beat your performance you previously have achieved on some track 💪.