vincentneo / CoreGPX

A library for parsing and creation of GPX location files. Purely Swift.
https://www.vincent-neo.com
MIT License
261 stars 56 forks source link

Potential TCX support #38

Open thepost opened 5 years ago

thepost commented 5 years ago

You've done a great job in creating a very friendly interface to use this API. Would you be open to expanding this library for TCX support?

I'm looking at adding TCX in my app at the moment, and would be happy to dive deeper into what TCX integration could look like and contribute to the work.

Keeping similar names in convention with the TrainingCenterDatabase schema would be best, perhaps prepended such as:

vincentneo commented 5 years ago

Hi @thepost,

Thanks for your support in the CoreGPX project! While adding TCX support kind of doesn't suit the name of the project, I am quite okay with having it, as long as the GPX support remaining the main focus of it.

That said, I lack the understanding of what TCX really is, at the present moment. Taking a look at the schema, it seems like a proprietary health-oriented version of GPX.

It would be good, if you could share some of your understanding of the TCX file standard, how it should be 'operated', and whether if the proprietary nature of TCX would impact CoreGPX in a negative way, in your opinion.

Sincerely, Vincent

thepost commented 5 years ago

Hi @vincentneo, sorry for the delay.

TCX is proprietary created by Training Peaks, but is an openly supported standard supported by Strava, Garmin, etc. The benefit it adds is that it supports heart rate data, weather, lap times, among other additional attributes specific to exercise.

GPX wasn't actually created as a standard for exercise, so it makes sense that it's lacking data support for athletes. While GPX allows you create custom tags, this is cumbersome, and inconsistent between platforms. What was your original motivation for creating CoreGPX? Do you use it for working out, or for more of a surveying or geography career oriented purpose?

However, this library is quite large already so it may make sense to build a separate one for TCX.

vincentneo commented 5 years ago

Hi @thepost,

Sounds like it can be implemented, but as you've said, maybe as another library.

My original motivation was kind of from the merlos/iOS-Open-Gpx-Tracker, as the original code used in that project was the abandoned iOS-GPX-Framework written in Objective C. I ported it over to swift, and as time goes by, there is now some obvious differences (like Double instead of CGFloat, native XML parser instead of TBXML)

I generally use the GPX file format for geotagging pictures taken from my DSLR. As such, there wasn't really a exercising/surveying element to it, rather just so that I could find the same place that I have previously taken a photo of, in the future.

That said, I would be more than happy to implement another library for things like TCX format. I understand now that the use cases would be for active workouts, instead of being just the plain old GPX, without the additional attributes.

I will further check about TCX, and will assess on whether to include TCX, or to make a new library for TCX, and potentially other formats similar to GPX/TCX.

vincentneo commented 5 years ago

Hi @thepost.

I am planning to start work on this probably by the end of this month. Have explored TCX a little bit more, and it seems to be huge, especially activity.

It will be a spun off side project named CoreTCX, and will be done on and off when I have the time.