Merge altitude data from Polar file into CP file?

Discussion in 'Power Training' started by wattsup?, Jan 30, 2006.

  1. wattsup?

    wattsup? New Member

    Joined:
    Nov 4, 2005
    Messages:
    29
    Likes Received:
    0
    Anyone tried or know how or if it's possible to merge raw altitude data from a Polar file into a corresponding file in Cycling Peaks? Meaning I have my Polar s720 computer recording ride time and altitude only while simultaneously running the PowerTap. This is bereft with issues as, unless I stop my Polar everytime the PT stops (or drops out) then the data loses sync, but wondering if there are any tools available to address this, say if I have my clock time sync'd up on each device if the CP software looks at this and can then correlate the data somehow. I can capture and download both data sets into the computer fine, but don't know how to merge them together. IIRC, when I tried to do a copy and paste, it inserted the data wherever I had the "cursor" in the CP timeline, but saw no way to merge the data.

    I hope this makes sense. I did a search and couldn't find previous posts on this. Any feedback or suggestions appreciated.

    Thanks,

    Ethan
     
    Tags:


  2. Dini77

    Dini77 New Member

    Joined:
    Sep 21, 2005
    Messages:
    186
    Likes Received:
    0
    I was looking to do this as well and the only suggestion i have is to get Saris to:
    1) include altimeter or GPS funtionality into PT
    2) get permission from Andy to allow NP algorithms to be incorporated into the PT CPU to calculate it on the fly
    3) have pre-programable interval functionality/timers etc (similar to what you can do with Polar HRMs, expect with power instead)

    that's my immediate wish-list for now, but don't think it will happen any time soon:mad: I'm sure there's some smart person out there who has/can develop some interim workaround that addresses all this! None of this actually helps answer your questions, but just needed to get that off my chest:p
     
  3. RapDaddyo

    RapDaddyo Active Member

    Joined:
    May 17, 2005
    Messages:
    5,088
    Likes Received:
    41
    Hey Ethan,

    I've never looked at the Polar file structure. Does it have an altitude column? Anyway, if it does you might try exporting both the Polar and PT files as .csv files. Then replace the power column of the Polar file with the power data from the PT. The time columns won't match up but I think you can use something like one of the LOOKUP functions in Excel to look up the nearest time value in the PT file and insert the value from the watts column on the same row into the Polar file. Then you could import the modified file back into CP. Not sure it will work and I hope you have a few cold beers on hand to muddle through all this. I'll take a look and see if this Rube Goldberg approach actually works and will let you know. I just have to export a workout file as a Polar .csv and look at it. I'm just chillin' at the moment so I'll take a look. You're getting to be quite the data hound.:D Cheers.
     
  4. Dini77

    Dini77 New Member

    Joined:
    Sep 21, 2005
    Messages:
    186
    Likes Received:
    0
    Polar Preceision Software has an altitude column in it and you can export to csv as you mention, but as you highlight, you have to manually 'fudge' around to match up time, etc and if you get any lost data then it throws it out. I dumped it in the 'too fiddly & time consuming basket' and figured that it's easy enough to tell from the power data when you've hit a hill. What i've done instead is just run the altimeter on my climbs, dump the data in excel to get profile Vs distance and now plan what power i want to ride certain sections of the climbs at.

    Actually, as i write this, it may be 'cleaner' to look at the data for Power and altitude Vs distance instead of time. Also, if you changed the sampling rate in PT to match that of HRM (say 5sec which is the min rate in S720 unit), would this circumvent the matching of data issues - ie you should have matching data points if both units started recording at the same time right??:confused: Have i inadvertantly stumbled on a solution??? I'll have a look at it as well
     
  5. RapDaddyo

    RapDaddyo Active Member

    Joined:
    May 17, 2005
    Messages:
    5,088
    Likes Received:
    41
    I dumped a CP workout file as a Polar HRM file. It has some header garbage and then 4 fixed width columns. You could strip the header and import into Excel as fixed width column data. Then you could throw in a new column for the time counter and do an incremented fill. The 5sec recording interval is going to be ~3x the PT recording interval. As to the power replacement from PT, I think you could use the VLOOKUP function in Excel to lookup values in the PT file corresponding to the time counter in Polar (or first value greater), then insert the watts value from the watts column. Then you have an integrated file and I don't know what the hell you do with it after that.:confused:
     
  6. acoggan

    acoggan Member

    Joined:
    Jul 4, 2003
    Messages:
    3,047
    Likes Received:
    9
    Saris would have to express an interest first (which they haven't), then they'd have to work out a deal with TrainingPeaks, to whom I've fairly recently licensed the rights to normalized power, etc. (although since the algorithm is in the public domain, the only thing TrainingPeaks can protect - via a trademark - is the name "normalized power").
     
  7. JustCurious

    JustCurious New Member

    Joined:
    Feb 18, 2005
    Messages:
    48
    Likes Received:
    0
    Have you also licensed (or do you plan to license) your training manager model?
     
  8. acoggan

    acoggan Member

    Joined:
    Jul 4, 2003
    Messages:
    3,047
    Likes Received:
    9
    Yes - basically I got tired of other people trying to make money off my ideas without my permission, so figured I'd turn the responsibility of keeping everyone honest over to someone else.
     
  9. JustCurious

    JustCurious New Member

    Joined:
    Feb 18, 2005
    Messages:
    48
    Likes Received:
    0
    So can we assume that some future revision of CP will include your training manager?
     
  10. acoggan

    acoggan Member

    Joined:
    Jul 4, 2003
    Messages:
    3,047
    Likes Received:
    9
    Yes, although precisely when that might occur I don't know.
     
  11. Dini77

    Dini77 New Member

    Joined:
    Sep 21, 2005
    Messages:
    186
    Likes Received:
    0
    don't suppose you know if they've expressed any interest in doing so? there's so much more functionality they could incorporate into the CPU, i wonder if anyone over there is thinking about it
     
  12. acoggan

    acoggan Member

    Joined:
    Jul 4, 2003
    Messages:
    3,047
    Likes Received:
    9
    Considering that:

    1) I only licensed normalized power, etc., to TrainingPeaks fairly recently

    2) Saris has never expressed any interest to me

    3) Saris has their own paid "guru" in the form of Allen Lim,

    4) Saris at one point planned incorporated a TSS-like "PowerTap" score in thei software (indicating that they aren't oblivious to what's going on around them), and

    4) Saris is apparently sufficiently concerned about the success of CyclingPeaks that they are contemplating encrypting their data files such that they can only be read by their software

    then I'd place the odds of them considering putting normalized power into the CPU as somewhere between slim and none.
     
  13. Dini77

    Dini77 New Member

    Joined:
    Sep 21, 2005
    Messages:
    186
    Likes Received:
    0
    well, that's a tad petty of Saris.
     
  14. acoggan

    acoggan Member

    Joined:
    Jul 4, 2003
    Messages:
    3,047
    Likes Received:
    9
    I imagine that they are only looking out for their own bottom line: by encrypting the files they probably hope to encourage people to sign up for their yet-to-be-released online data storage/analysis service, thus extracting additional $$ from every PowerTap owner every month.
     
  15. Bruce Diesel

    Bruce Diesel New Member

    Joined:
    Dec 7, 2004
    Messages:
    188
    Likes Received:
    0
    Back to the topic :rolleyes:

    I have had a look at doing this programmatically. I think it is do-able.

    Essentially, the Polar file has a longer sample period - 5 secs. Fortunately altitude data is continuous (power data is more stochastic). Thus the altitude data can be interpolated and re-sampled at the sampling rate of the PowerTap. Given that altitude does not change very quickly, I think a straight line interpolation between each data point would be more than accurate enough.

    The problem remains in synchronising the data. Here my thoughts are to use the interval function on both devices - while remaining stationary. It is certainly possible to press the interval buttons on both devices almost simultaneously - at least within a fraction of a second of each other. The intervals are present in the downloaded files - so the data could be synchronised from them. A little bit of gymnastics would be required with the Polar file as the interval data is in a table in the header.

    Now, just to get round to writing the code.
     
  16. RapDaddyo

    RapDaddyo Active Member

    Joined:
    May 17, 2005
    Messages:
    5,088
    Likes Received:
    41
    Assuming you can integrate the Polar altitude data to the PT file or integrate the PT power data to the Polar file, what do you do with it then? I think it would have to be from PT to Polar because I don't think CP is prepared to recognize altitude data in a PT file upon import. So, it seems as though you would have to create a Polar file with PT power data, right? The good news is that you can just average power across the time interval (~4:1 time interval ratio).
     
  17. Bruce Diesel

    Bruce Diesel New Member

    Joined:
    Dec 7, 2004
    Messages:
    188
    Likes Received:
    0
    That depends on whether CP is aware that a polar file can only be 5secs and not 1 sec. If PT is merged into polar, then I would use all the samples from the PT file, because cadence would also be stochastic. Create a polar file with all this data and then import into CP. So, yes, I would go with the polar format, and specify a sampling period of 1 sec. I have some old polar files with power data lying around. I could try modifying the sampling period and import and see what happens.
     
Loading...
Loading...