Formula to get Activity SPLIT Pace & Gap

306 views
Skip to first unread message

Jhunsanne Ray Bautista

unread,
Dec 17, 2019, 11:49:09 AM12/17/19
to Strava API
Hello guys,

I just want to ask how to compute the Pace & Gap (1st screenshot) using the data return by the API (Endpoint: activities/{id}/laps, 2nd Screenshot)?

Thank you!


First Screenshot:

Strava Activity - Splits.png


Second screenshot:

Strava  API - Split Standards.png



Shikhar

unread,
Dec 21, 2019, 3:36:48 AM12/21/19
to Strava API
I think the GAP model is based on tons of statistics about the change in speed based on grade, HR, temperature and so on, so I don't know if there's a 'formula'. You could gather lots of data controlling for temperature and HR to see the affect of grade on speed, and maybe the results will let you make your own formula.

Jhunsanne Ray Bautista

unread,
Jan 2, 2020, 11:50:54 AM1/2/20
to Strava API
Hi Shikar, thank you for the response. I tried different combinations but sadly, I can't seem to duplicate the answer. How about the pace? do you have any idea how did they come up with the value based on the given data?

Thank you

Lê Minh Truyền

unread,
Jul 20, 2021, 12:18:00 PM7/20/21
to Strava API
Hi all,

I have the same problem.

Calculate split pace from API is different with Splits display on website? 

I want to know formula to get Splits?

Can anyone help me?



Jan Mantau

unread,
Jul 20, 2021, 2:01:44 PM7/20/21
to Strava API
In the screenshot of Jhunsanne the pace is moving_time/60

Lê Minh Truyền

unread,
Jul 20, 2021, 9:06:13 PM7/20/21
to Strava API
The problem is when get splits data from API, I try calculate pace both moving_time / 60 or elapsed_time /60,  but the result were is different with the pace display on website.

Jan Mantau

unread,
Jul 22, 2021, 1:17:47 PM7/22/21
to Strava API
I just tried that with a run and 1 km splits from the splits_metric array in the detailed activity endpoint: With moving_time/60 or 60/(average_speed * 3.6) I got exactly the pace from the website. I don't have a website view with miles instead of kilometres but when trying some calculations with the splits_standard array then moving_time/60 or 60*1.61/(average_speed * 3.6)  gave me the expected results too.
Maybe you can post screenshots from the website and from the json.

Lê Minh Truyền

unread,
Jul 22, 2021, 11:16:24 PM7/22/21
to Strava API
Hi guy,

I have activity: https://www.strava.com/activities/5627125639, I use meter

- The website: https://prnt.sc/1elhv83

I calculate base on array splits_metric, but it difference width splits display on website.

You can try to check.

Thanks

Jan Mantau

unread,
Jul 23, 2021, 11:31:57 AM7/23/21
to Strava API
It seems that for walks the moving_time in the metrics is just a copy of the elapsed_time without regarding any pauses whereas the website uses the "real" moving time. I would say this is a bug in the API response.
Reply all
Reply to author
Forward
0 new messages