Compare laps from previous activities

I'd like to write an app (unless there already is one) that shows me my average pace and average HR for each lap against that last time I ran the same route. Looking through the SDK I can't see a way to do that directly. Is that right? If not, I'm happy to use settings or a companion app to load the previous lap data into my app.

Could anyone give me any advice or suggestions on doing this, or perhaps point to any other source code of something that does something similar/related?

Thanks

  • Finally got around to mocking this up. Here's what I have so far to illustrate what I'm trying to achieve:

    Here I have a course called trk5k which is a 5k time trial on a 400m track. I'm on lap 3 of 12 (actually should be 13). When I ran it on 25 Dec on lap 3 I ran at 15:23 pace with a 164 HR and a Stryd power of 245. Currently this time round I'm running lap 3 at 15:21 pace with a slightly lower HR and increased power.

    Since I might have missed the end of the last lap, I'm including the differential between the last lap I ran in seconds/hr/power from that of the December run.

    On the last but one line I have the current pace (averaged over x seconds maybe), HR and power.

    Final line is estimated finishing time and estimated differential from previous run.

    If that makes sense, apart from the bogus timings due to wanting to see what the maximum field width would look like. What I'm trying to figure out is how to import the lap info from the previous run. I think I have three options, I can use settings (very painful), I can retrieve from a web server, or I can use a companion android/ios app.

    Not only that, I have to get the lap info from garmin connect as I don't think I can get it from the watch.

    Are my assumptions correct? Any suggestions given the above?

    Thanks!

  • Unless you store all past activity into the datafield or such, you will not get it. CIQ cannot get to garmin connect activity or within watch activities. 

  • Well, it exists, so I can get it. It's just case of how difficult it is to get it. I can export to csv if I want to do it manually, or I can screenscrape with Mechanize it if I have to. That gets me the data from garmin connect. Then I have to get that into the datafield next.

  • You'd need to set up something like a web service and then pull it down in the background process of a DF.  Even if you had it as a file on the watch, there is no way to read that file with CIQ.

    You could pass things by way of app settings too.

  • Ok. Thanks. So it looks like there are no shortcuts to this. I'll figure it out then. 

  • Could you just write your own app to monitor/calculate all the various parameters during the run, and then store them off using Application.Storage.setValue().  You could assign a button press to push the "current run" values into the "previous run" storage.

    What I'm not sure of is if all the parameters you're displaying are easily accessible in a ConnectIQ app.  I'm new to this, and I've tried displaying HR in one of my own apps, and while I can fetch it in the program, in the simulation it always returns null rather than a usable value.  Wasn't sure if that is a simulator shortcoming and if I side-loaded it I'd actually get legit HR values, or if HR just isn't accessible in a WatchApp.  Can someone answer that question for me (sorry for the hijack)

  • If an app writes to Storage, only that same app can read it.  Storage is "owned" by an app and not shareable between apps.

  • understood, I was suggesting that he use the same app for recording the data during the run, and then comparing various runs after the fact, or compare current laps to prior laps during a given run.

  • I guess that's a possibility. But I really wanted to do this by choosing any previous run/ride I'd done and being able to compare with it. I'd like to know if I were doing an easy activity at a lower heart rate indicating perhaps an increase in fitness, or a hard run based on pace. But comparing the exact same route.

  • I'm thinking this would be a DF, and no way to interact with it.

    If it's a Device App, it could save the info to Application.Storage each time the app runs.  You've have to have an menu or something to select waht you want to came the current activity against.