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

Building a Pacer App

I am running my first real race this weekend, but in my training I'm struggling to run at a consistent pace. I tend to run too fast, and then I can't endure. But if I run too slow, I won't make my target time. So, I wanted to write an app that monitors my pace during the exercise so I don't have to keep looking down at my watch. Basically, start the standard "Run" exercise, but then have my app buzz a few times real fast if I'm going too fast, and a long, slow buzz if I'm going to slow (for example, 30 seconds on either side of my target pace).

 

This is a highly-requested feature here: https://community.fitbit.com/t5/Feature-Suggestions/Pace-alerts/idi-p/2166448?advanced=false&collaps...

 

I'm not sure, though, what kind of app I need to write. The only place I see in the SDK that has pace-related info is in the ExerciseStats interface. Does that mean I have to create my own exercise just for this? I didn't really want to have to implement all the features of the built-in Run exercise just to bolt this on.

 

If I do have to implement my own custom exercise, does anyone have any good examples of one that I can use as scaffolding?

Best Answer
0 Votes
1 REPLY 1

I see two posibilities: if you're only interested in pace, you could use the geolocation API to determine your speed via GPS. Then you could transform speed (e.g. m/sec) to pace (e.g. min/km).

Second posibilitiy is to use the exercise API with the "run" exercise type. Here you can get the pace directly. As a template for such an exercise app, you might use this app by Jon@Fitbit:https://github.com/Fitbit/sdk-exercise

One note: in my own running app I am also retrieving pace from the exercise API. However, the results are somewhat imprecise and eratic. To get more precise results, I am calculating the floating average of the last 30 pace values, where I pick a pace value every second.

 

Best

 

Uwe 

 

 

Best Answer