Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cadence, GPS Distance, Pace

I may be missing something obvious, but ....

 

I want to be able to report on running cadence, GPS distance and Current / AVG Pace. Are there ready built APIs that provide this information?

 

It is of course possible to interogate the WEB / ACTIVITY api to get stride distance - but it isn't always convenient to have the phone with you.


I don't want to start re-designing the wheel if this is already done 🙂

GPS distance and pace are relative straightforward to achieve with the Geolocation API.

 

Having come from a Suunto Ambit background, all the live figures are available within their programming environment. I love the configurability of the Fitbit display. Need the best of the both worlds!!


Thanks in advance

 

Best Answer
0 Votes
6 REPLIES 6

There is unfortunately no API to hook into calculated exercise metrics, although there really should be if Fitbit actually wants people to develop interesting sports & fitness apps.

 

You'll have to do it all manually. I imagine you'll have to poll a stepcount reading (every second?) in order to calculate a rolling average SPM to display.  The stepcount at the end of an exercise reported by the web api, when calculated into an average cadence always seems in the right ballpark for me (I have my fitbit profile configured for automatic stride length, for whatever that's worth)

 

I would use this app! It just seems like a lot of work to have to recreate a lot of the functionality of the built in Exercise app. That and I think uploading the run to Fitbit's API would be a must have feature. The Log Activity endpoint via the web API is extremely limited. It can only accept the distance and the duration really.  

Best Answer

Am I right in thinking the only place the step count reading is available is through the web api? Which in turn relies on timely synchronisation.

 

Which, if I am correct (which I hope not to be) means that until there is an API to hook into the only way is to calculate required metrics yourself. Seems like a substantial shortfall and missed opportunity if that is the case.

 

So that brings it back to does any one know of a robust method of deducing cadence from the accelerometer?

 

It would also be nice to know if the "missing" metrics are going to be covered by updates to the relevant api's, and what sort of timescale.

Best Answer
0 Votes

Thankfully you can read steps locally without the Web API with the User-activity API.  I would hope to be able to trust the reading.

 

Deducing cadence from the accelerometer seems (to me anyway) very difficult.  If you are really interested in this I would say a good starting point would be this article: https://medium.com/pebble-research/opening-the-black-box-publishing-pebbles-activity-tracking-algori...

That seems like a rabbit-hole though and who knows how accurate it could be.

 

I've thought about making an app like this for mostly personal use, but I really wish the built in exercise app could be a "starting point" for us third-party developers. 

Best Answer

So much reading I I missed this. Thank you.

 

I will do some testing to see how "real time" it is.

 

Have done some reading up on calculating cadence from accelerometers and it is an interesting subject.I fear the solution is probably beyond my ability 🙂

 

 

Best Answer

Initial tests look very reasonable - thank you so much for the pointer kenjamin - much appreciated. I was so not relishing cadence calculations. 

 

The plan for my app is to keep the boss at home informed of where I am when out training. Providing a google map of current location and the previous periodic "ping locations" with time, speed, heading etc is relatively simple.

In watch I would like more information that will help me to pace for a marathon (never done a marathon before) and have an ambitious time target. Training cadence can only really be done when out on course as your own perception of cadence can be way off reality, especially when tired. Average pace and expected time to completion for the distance set in settings so that no mental agility is needed out on event.

 

Post event, I want to "download" a gpx / tpx file that can be analysed in whatever tool chosen. I do record all of my activity on Strava - so that will be my starting point. Generating a gpx again will not pose too much of an issue, the challenge will be getting the "chunked" data out of the watch, through the companion, and to a "supporting app" on a php web server.

 

The fitbit app is not ever likely to be published so really just needs to be functional for me.

Best Answer
0 Votes

Good luck! You're right on the main challenge being getting the data out of the ionic especially with the large datasets you'll be working with for marathon training. And feel free to submit anything you make to the app gallery. I'm sure a lot of runners, including myself, would find it useful.

Best Answer