Engineering - Physical World Test Cases

Date: 28.06.2021


At the core of TrackFootball is its movement detection algorithm. The algorithm can detect walks, movements (walk+jog), jog, runs and sprints from a GPS geojson input data.
I wanted to make the algorithm tweak-able to adjust/tinker to different player profiles, but at the same time I want it to be reliable and predictable. If a change in algorithm affects past activities by changing the calculated metrics, I should be aware of that before deploying the algorithm.

Tests from the Real World

So, I produced reliable data by actually recording a walk, run, jog and sprint. I then used that data as an input to the algorithm and wrote test cases.
Results of the tests run from jest test runner.
Results of the tests run from jest test runner.
This gives me the confidence that I didn't significantly break the algorithm when I tweak it a bit. Of course, this is linked to my running profile, and it might break for other athletes.
Here are these activities in TrackFootball


GPS Data

GPS data can vary a lot depending on the area (of the world), proximity of trees/buildings/bigger structures, signal strength, number of satellites connected to.
This particular sample data was taken in Jammu, India. I will soon get more data in Berlin, Germany and add to the test suite.

Effort is Personal

Sprinting for me might be different from sprinting for an athlete. The algorithm would eventually solve by user defined range for an effort. It would be interesting to build a fair system that can be used across athletes.


The algorithm is still in very early stages, and we will think of ways to make it generic for all athletes. That would allow us to create "fair" leaderboards where folks can be compared against each other.
Logo of trackfootball.app
Made for players looking to improve their games
Compatible with Strava logoWorks with Fitbit logo