Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode lap data #8

Closed
mru00 opened this issue Feb 12, 2015 · 6 comments
Closed

Decode lap data #8

mru00 opened this issue Feb 12, 2015 · 6 comments

Comments

@mru00
Copy link
Owner

mru00 commented Feb 12, 2015

The program should also decode and output lap data.

Some information is already known, cf.https://github.com/mru00/GpsWatch/blob/master/image2gpx.pl#L177

Challenge: how to store lap information in tcx file?

@Pierke
Copy link
Contributor

Pierke commented Feb 13, 2015

According http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd an activity can have 1 or more laps. Each lap has a track. So based on that info, you could split the single track in your current file in to separate tracks. One track for each lap in the lap table.
With all the track waypoints in a list and the start and end time of each lap known it should not be to difficult to get the waypoints that belong to the track of each lap.

Not sure if this solution will import in RunKeeper but will try a manualy edited tcx file.

@ajfclark
Copy link
Contributor

I've been working on this over the weekend. I've got some code that pulls the lap data from the watch and then as the samples are pushed to the broadcaster, checks whether the sample time > the end of lap time and if so, splits the lap and starts another. The XML parses as valid against the schema but RunKeeper sadly does nothing with the extra information. MyTourbook puts little markers on the map etc.

I'll figure out how to get the code up today sometime.

ajfclark added a commit to ajfclark/crane_gps_watch that referenced this issue Feb 16, 2015
Added LapInfo structure
Populated with data in Watch.cpp
Added a Lap callback
Added Lap printing in DebugWriter and TcxWriter
@ajfclark
Copy link
Contributor

I've been thinking about the output of the lap data that I moved into the DebugWriter.

I'm not sure that's such a great place for it. I can see instances where I want that data output, but not the rest of the debug output. In fact, I think that'd be my default mode for using the program:

  1. Go for a run
  2. Pull data from the watch and dump stats
  3. Upload to runkeeper or whatever and use the stats to add commentary to how it went

I was thinking of expanding the stats accumulation to cover everything that GPS Master currently does, so time below/in/above HR target zone, Min, Max, Avg HR, Calories, etc for the workout, plus the per lap stats.

I was wondering if it was worth adding a StatsWriter and a commandline switch for it? I guess the other option is to just encode stats into the elements of the tcx output. Should I raise this as a separate issue? Any thoughts?

@mru00
Copy link
Owner Author

mru00 commented Aug 23, 2015

Is the latest and greatest source good enough? can we close this issue?

@ajfclark
Copy link
Contributor

I've built on your work a little more to make the output a little tidier. I think this can be closed. If I expand on this work more, I'll just make another pull request later.

@mru00
Copy link
Owner Author

mru00 commented Aug 24, 2015

Great, thank you for your contribution!

@mru00 mru00 closed this as completed Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants