erik / derive

Generate personal heatmap from GPX/TCX/FIT/IGC data
https://erik.github.io/derive
MIT License
497 stars 63 forks source link

Feature Request: filter by type #65

Open hutima opened 2 years ago

hutima commented 2 years ago

I understand this is mostly used for strava, I personally use it for arc.app exports (https://www.bigpaua.com/arcapp/) lifelogging and it would be great if filtering by type of track (walking / running / etc) could be added

erik commented 2 years ago

What format does arc.app use? Sounds like a nice feature, but it seems that the GPX spec doesn't have an official way to indicate activity type, so it might not be reliable to use the various extensions. FIT files on the other hand should work

hutima commented 2 years ago

It's a .gpx file as an export. It uses the <type></type> flag that seems to also be present in strava. Strava seems to have a numeric index in it's GPX file exports that isn't officially published but that I can see on stackoverflow: https://stackoverflow.com/questions/61903437/what-do-the-strava-gpx-type-type-elements-mean (e.g. my last run export from strava has <type>9</type>)

While the monthly GPX files exported by Arc are explicitly stated in the flag (eg. <type>Car</type> )

types seem to be defined per <trk></trk> and the arc app exports are just a list of <trk></trk> within <gpx></gpx>

erik commented 2 years ago

Nice, thanks for the reference. My impression is that it would be too much effort to try to maintain a consistent activity mapping across all possible GPX creators, but if we had the filter UI use only what's contained in the <type> field, I think that could be reasonable.

But - that does mean that for Strava, you would be filtering to e.g. type=9, which is a terrible UI.

hutima commented 2 years ago

Best way if it’s possible is probably to filter by a distinct list of types in the uploaded files and if it’s numeric, rename it as Strava does according to that post in stackoverflow

in the end the primary use case for most people using this is strava, so if you’re willing to add the functionality, it should probably be built with that in mind first, I can always edit type flags to match strava in uploaded gpx files