Introducing running-conversions

https://github.com/czeczotka/running-conversions

As part of my preparations for a half-marathon and later the full marathon I was following a training plan which more often than not left me with a pen and paper calculating different paces and times for running activities. For example if you want to run a half-marathon under 2 hours what pace should you aim for? If you run it at 5:20 km/min what would be your finish time? If your plan tells you to run an interval of 600 metres in 2m34s what should be your pace?

After some training I also realised that running trackers have an accuracy which leaves a lot to be desired. They are good at measuring time but your location, distance and as a result pace is more of an approximation than actual measurement. It was a slight disappointment when I missed my first 10k’s finish time by 30s while being convinced I will be spot on with the result. My tracker simply measured 10.3k distance instead of 10k and so the pace was overestimated (i.e.: I thought I was running 4:55 while it was more like 5:05). That’s how I learned that the only reliable way of controlling your pace is following your time and checking it on the marker points. So how do you know your splits? For instance if you want to run the marathon in 3h30min what should be your 5k splits?

In order to answer these questions I could use some of the online calculators but I decided to have my own pet project and implement a Scala tool to solve these problems. That’s how running-conversions project was born. The basic idea that you create an activity which is either based on the distance and time or distance and pace and then you can query its properties. I described the installation and usage in the project and here are some examples of the calculation you can do:

// calculate the total time of the activity
input:  marathon at "5:41" time 
output: 3h59m48s
// calculate the pace
input:  k10 in "49m00s" pace 
output: 4:54
// get 1 kilometre splits for an activity
input:  k10 in "44m30s"  splits
output: Map(1.0 -> 4m27s, 2.0 -> 8m54s, 3.0 -> 13m21s, 4.0 -> 17m48s, 5.0 -> 22m15s, 6.0 -> 26m42s, 7.0 -> 31m09s, 8.0 -> 35m36s, 9.0 -> 40m03s, 10.0 -> 44m30s)
// calculate 5k splits to run the marathon in 3 hours 45 minutes
input:  marathon in "3h45m" splits k5
output: Map(5.0 -> 26m35s, 10.0 -> 53m10s, 15.0 -> 1h19m45s, 20.0 -> 1h46m20s, 25.0 -> 2h12m55s, 30.0 -> 2h39m30s, 35.0 -> 3h06m05s, 40.0 -> 3h32m40s)
// calculate 400m splits to run 2000m in 8 minutes
input:  metres2000 in "8m00s" splits metres400
output: Map(0.4 -> 1m36s, 0.8 -> 3m12s, 1.2 -> 4m48s, 1.6 -> 6m24s, 2.0 -> 8m00s)

https://github.com/czeczotka/running-conversions

With the interface via Scala REPL or by writing your own code it’s a bit rough on the edges but it has solved my problems so far. Let me know you thoughs. I am keen to learn if anybody is doing some work in this area!

One thought on “Introducing running-conversions

Leave a Reply

Your email address will not be published. Required fields are marked *