The idea is to be able to track a runner or cyclist along a route in real-time in order to be able to meet along the way or to pick them up at the end. While there are some companies that offer this kind of service, I didn’t find anything that worked well (tried a couple of apps) and thought that this should be easy to build and maintain.

I have some experience using Leaflet.js and there are a number of cool plugins that deal with gpx data, so this was the obvious candidate. In terms of the web server, Flask is normally my framework of choice. An easy way to serve the map is to use PythonAnywhere or Heroku.

On the phone side, I found the Overland app, which is available for both Android and iOS, and does exactly what I need for this project. It lets you configure an end-point of your choice and it just sends GPS data. You can select the desired frequency and it has a lot of nice features like caching the data locally if no connection is available, etc. I’ve found battery consumption is very reasonable as well.

With respect to the route, I normally upload a gpx file with my intended route and it is displayed in the map alongside with my progress. This is quite useful to infer how far in the runner is into the run, etc. Also, there are some statistics at the bottom, including the total distance travelled so far and the total ascent. These are computed purely relying on phone GPS data, which can be inaccurate (specially altitude, in some phones!), so I decided to query a free DEM service online to correct elevation data before it’s stored in the current trip.

All in all, this project turned out to be quite useful and works well. It’s easy to maintain and can be easily deployed online for free, as mentioned above.