Author Topic: Perm GPX Validation from WAHOO  (Read 3137 times)

Perm GPX Validation from WAHOO
« on: 19 October, 2020, 10:09:26 am »
All Perm Organisers

Just wondering how other perm organisers, offering GPX Validation, are handing FIT / GPX files supplied by riders who use WAHOO.

A rider sent me a FIT file from his rider, but I cannot read this file using any software I have in order to convert into a GPX file.

The subsequently supplied GPX file is very small (50 KB) and lacking any timestamps.

Naturally the Audax Validation software is having issues.

So, how do I direct the riders on how to supply a GPX track that is acceptable for validation?

Anton




Re: Perm GPX Validation from WAHOO
« Reply #1 on: 19 October, 2020, 10:22:10 am »
I could be wrong, but is the Wahoo version 2 .fit file format? If so, the only way I have to convert those is to import to ridewithgps and export from there as .gpx. I would like a scriptable conversion but gpsbabel does not support version 2 (unless recently).

fuaran

  • rothair gasta
Re: Perm GPX Validation from WAHOO
« Reply #2 on: 19 October, 2020, 10:38:24 am »
Seems FIT support has been improved in recent versions of Gpsbabel, so it should work with v2 FIT files. Could be worth trying the latest version.

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Perm GPX Validation from WAHOO
« Reply #3 on: 19 October, 2020, 02:08:02 pm »
GPSBabel claims to support FIT 2 provided you use the latest version.

The Audax validation software can't read FIT at all.  However the tracklog uploader will convert FIT to TCX (which the software can read) - but that converter can't successsfully convert FIT 2.  During the lockdown I tried to replace that older converter with GPSBabel on the Audax server, but that didn't work out unfortunately.

It's a problem that will only get worse with time as Garmin have indicated that they will move to FIT 2 on their newest devices.
when you're dead you're done, so let the good times roll

Davef

Re: Perm GPX Validation from WAHOO
« Reply #4 on: 19 October, 2020, 02:27:03 pm »
GPSBabel claims to support FIT 2 provided you use the latest version.

The Audax validation software can't read FIT at all.  However the tracklog uploader will convert FIT to TCX (which the software can read) - but that converter can't successsfully convert FIT 2.  During the lockdown I tried to replace that older converter with GPSBabel on the Audax server, but that didn't work out unfortunately.

It's a problem that will only get worse with time as Garmin have indicated that they will move to FIT 2 on their newest devices.
I have some c++ I wrote for converting fit to gpx. It is built as a windows command line executable but I can make it available as a web service. Do you have a sample fit 2 for me to try it with ?

Re: Perm GPX Validation from WAHOO
« Reply #5 on: 19 October, 2020, 05:08:40 pm »
Garmin Basecamp can import fit and export GPX tracklog files. Not trendy software but it does have its uses.

But basically I’d politely tell the rider to provide a valid GPX tracklog. The conversion effort should be theirs not yours.

telstarbox

  • Loving the lanes
Re: Perm GPX Validation from WAHOO
« Reply #6 on: 19 October, 2020, 06:06:27 pm »
Is it possible they've sent you the route file gpx by mistake, not their recorded ride?
2019 🏅 R1000 and B1000

Davef

Re: Perm GPX Validation from WAHOO
« Reply #7 on: 19 October, 2020, 06:53:22 pm »
Garmin Basecamp can import fit and export GPX tracklog files. Not trendy software but it does have its uses.

But basically I’d politely tell the rider to provide a valid GPX tracklog. The conversion effort should be theirs not yours.
There is talk of fit version 2 above and I am not 100% sure what that is or whether basecamp or my software will cope.

Davef

Perm GPX Validation from WAHOO
« Reply #8 on: 19 October, 2020, 06:58:25 pm »
Just having googled there is a perl script here https://github.com/jeffrey-friedl/FIT-to-GPX

Other than bumping the version number I am not sure of the difference, if any, between fit 1 and 2.

FifeingEejit

  • Not Small
Re: Perm GPX Validation from WAHOO
« Reply #9 on: 19 October, 2020, 06:59:16 pm »
GPSBabel claims to support FIT 2 provided you use the latest version.

The Audax validation software can't read FIT at all.  However the tracklog uploader will convert FIT to TCX (which the software can read) - but that converter can't successsfully convert FIT 2.  During the lockdown I tried to replace that older converter with GPSBabel on the Audax server, but that didn't work out unfortunately.

It's a problem that will only get worse with time as Garmin have indicated that they will move to FIT 2 on their newest devices.

Hrm, just tried it with a Wahoo FIT2 and GPS babel isn't liking it.
ACh may as well do some "work" and clone the repo and have a look.


Edit: Well having read the error properly, i was trying with a corrupt file I got from somthing.
Tried another an it came in ok but not sure if that's an export from Strava/RWGPS or from device filesystem.

Seems they've dingied the Garmin API entirely and written their own processing. PResumably for licencing reasons as much as anything else.
My C++ is rusty...

Re: Perm GPX Validation from WAHOO
« Reply #10 on: 19 October, 2020, 08:43:43 pm »
It isn't your job to to convert files. Ask for it in a format that you can use.

Re: Perm GPX Validation from WAHOO
« Reply #11 on: 19 October, 2020, 08:54:51 pm »
Garmin Basecamp can import fit and export GPX tracklog files. Not trendy software but it does have its uses.

But basically I’d politely tell the rider to provide a valid GPX tracklog. The conversion effort should be theirs not yours.

Being a garmin user I’ve used basecamo to import a fit file and then export to gpx. Unfortunately the fit file supplied keeps crashing basecamp.


When I asked for the GPX the file is small and missing all time stamps

The riders attempted to extract the GPX a number of times but no joy with file supplied.

Re: Perm GPX Validation from WAHOO
« Reply #12 on: 19 October, 2020, 08:56:41 pm »
It isn't your job to to convert files. Ask for it in a format that you can use.

Agree but was trying to be helpful and this is first time in several years had issues with supplied GPX tracks for validation

fuaran

  • rothair gasta
Re: Perm GPX Validation from WAHOO
« Reply #13 on: 19 October, 2020, 09:08:23 pm »
Are you using the latest version of Basecamp (v4.7.3)? Think some older versions had issues with FIT files.

Feanor

  • It's mostly downhill from here.
Re: Perm GPX Validation from WAHOO
« Reply #14 on: 19 October, 2020, 09:14:29 pm »
I don't think any of the current crop of Garmin devices write out v2 FIT files, so I'd be a little surprised if Basecamp could read it.
But I don't have any v2 files to hand to test.

The Wahoo *must* be able to upload to Strava.
There's plenty riders with Wahoo units who use Strava.

From there, the rider will be able to download a GPX.

That has always been my workflow for DIYxGPS using even v1 FIT files from my elderly Edge 800. ( I never realised the AUK uploader cound accept FIT of any version. )





fuaran

  • rothair gasta
Re: Perm GPX Validation from WAHOO
« Reply #15 on: 20 October, 2020, 01:00:08 am »
I don't think any of the current crop of Garmin devices write out v2 FIT files, so I'd be a little surprised if Basecamp could read it.
But I don't have any v2 files to hand to test.
Apparently the Edge 520 and 820 did, and they were released several years ago.  Was plenty of complaints on the Basecamp forum at the time.
Presumably most newer models are similar. Seems it is necessary for some ConnectIQ apps, and extra data fields.

Re: Perm GPX Validation from WAHOO
« Reply #16 on: 20 October, 2020, 07:43:44 am »
My Wahoo rides automatically copy to Strava, I just exported the GPX from there. No issue with validation and less hassle than plugging the Elemnt into a PC to retrieve the file.

Davef

Perm GPX Validation from WAHOO
« Reply #17 on: 20 October, 2020, 08:22:19 am »
So I have done a little investigation

The current spec for fit is version 2. I would expect the current garmin basecamp to cope with it as the current garmin sdk does. The code I wrote (though not using the sdk ) for reading fit files a few months ago was based on the current spec and works with the one v2 sample file I have. If you base it on current spec there is no need to check version number (which is why I was unaware there was 1 and 2).

The main difference between fit 1 and 2 are (apart from a different version number in the header) the ability for developers to embed their own data in the file. A fit 1 reader that ignores the version number will happily read in a fit 2 file if it does not have embedded developer data, however it will keel over if there is embedded data.

The only change required to cope is in each record to check for a flag and read the number of bytes to skip and then skip these.

My current garmin device, a 1030 plus, produces v1 fit files but I cannot rule out the possibility that if it were linked to exotic other devices it might embed custom data and change the protocol number.

If someone has a sample .fit file from a wahoo to attach here it would be good.

Re: Perm GPX Validation from WAHOO
« Reply #18 on: 20 October, 2020, 08:28:03 am »
Having upgraded to a recent gpsbabel (1.6.0 although 1.7.0 is available) I have been able to convert a .fit from Element Bolt this morning.

Re: Perm GPX Validation from WAHOO
« Reply #19 on: 20 October, 2020, 09:22:43 am »
Problem solved.

It appears that the original FIT file supplied was incomplete, and once a new FIT file supplied I managed to upload this into my GARMIN basecamp and convert to a GPX file for the validation sw

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Perm GPX Validation from WAHOO
« Reply #20 on: 20 October, 2020, 09:56:12 am »
But basically I’d politely tell the rider to provide a valid GPX tracklog. The conversion effort should be theirs not yours.

I don't think this approach is sustainable in the long term.  FIT is a new standard** like it or not (and I don't, much) and by many measures it is a superior format to GPX.  It's not unreasonable that a rider used to the 'just works-ness' of Strava and RWGPS would expect the same of AUK.  Although there are plenty of us on this forum who like our Etrexes in general cyclists overwhelmingly prefer to use a GPS that they perceive as cycling-specific - and that means their end product is most likely to be a FIT.

AUK's software should by now be FIT-ready but it isn't, and I see no real prospect of that happening any time soon,  So I've addressed that shortcoming by detecting FIT files on upload and converting them - using old no-longer-supported software called fit2tcx.  I can't detect FIT2 files (because the extension is the same) so when these are submitted the attempted conversion just corrupts the submitted file.  Hence the note on the tracklog submission form for Wahoo users to submit their FIT files direct.

Apparently the current version of GPSBabel won't install on our oldish server OS, which is frozen in time until the new website takes over - some way away yet.  If anyone would be willing to supply an executable that can be run as a shell command under an oldish version of Ubuntu, that can reliably convert both FIT1 and FIT2 to GPX or TCX, that would be most welcome.


** standard - hah, about as much of a 'standard' as Microsoft's .doc format in the early days.
when you're dead you're done, so let the good times roll

Davef

Perm GPX Validation from WAHOO
« Reply #21 on: 20 October, 2020, 10:36:47 am »
But basically I’d politely tell the rider to provide a valid GPX tracklog. The conversion effort should be theirs not yours.

I don't think this approach is sustainable in the long term.  FIT is a new standard** like it or not (and I don't, much) and by many measures it is a superior format to GPX.  It's not unreasonable that a rider used to the 'just works-ness' of Strava and RWGPS would expect the same of AUK.  Although there are plenty of us on this forum who like our Etrexes in general cyclists overwhelmingly prefer to use a GPS that they perceive as cycling-specific - and that means their end product is most likely to be a FIT.

AUK's software should by now be FIT-ready but it isn't, and I see no real prospect of that happening any time soon,  So I've addressed that shortcoming by detecting FIT files on upload and converting them - using old no-longer-supported software called fit2tcx.  I can't detect FIT2 files (because the extension is the same) so when these are submitted the attempted conversion just corrupts the submitted file.  Hence the note on the tracklog submission form for Wahoo users to submit their FIT files direct.

Apparently the current version of GPSBabel won't install on our oldish server OS, which is frozen in time until the new website takes over - some way away yet.  If anyone would be willing to supply an executable that can be run as a shell command under an oldish version of Ubuntu, that can reliably convert both FIT1 and FIT2 to GPX or TCX, that would be most welcome.


** standard - hah, about as much of a 'standard' as Microsoft's .doc format in the early days.
To distinguish between a fit v1 and v2 you need to look at the second byte in the file. If it is 16 (0x10) it is fit1, if it is 32 (0x20) it is fit 2. This should be possible with standard Linux command line tools.

Edit: e.g. hexdump -b -n 1 -s 1

If I get a spare hour or two to dig up my Linux skills I will rustle something up to do conversion

I do need a fit 2 file or two to test.

quixoticgeek

  • Mostly Harmless
Re: Perm GPX Validation from WAHOO
« Reply #22 on: 20 October, 2020, 10:51:11 am »
It isn't your job to to convert files. Ask for it in a format that you can use.

It is however upto AUK to keep up with technology, and given the ubiquity with which devices that produce .fit files have become, it seems only right that AUK should be able to support them.

Perhaps something the amazing super awesome magic devs of the new site could sort out?

J
--
Beer, bikes, and backpacking
http://b.42q.eu/

Re: Perm GPX Validation from WAHOO
« Reply #23 on: 20 October, 2020, 01:50:40 pm »

FifeingEejit

  • Not Small
Re: Perm GPX Validation from WAHOO
« Reply #24 on: 21 October, 2020, 07:21:34 pm »
So I have done a little investigation

The current spec for fit is version 2. I would expect the current garmin basecamp to cope with it as the current garmin sdk does. The code I wrote (though not using the sdk ) for reading fit files a few months ago was based on the current spec and works with the one v2 sample file I have. If you base it on current spec there is no need to check version number (which is why I was unaware there was 1 and 2).

The main difference between fit 1 and 2 are (apart from a different version number in the header) the ability for developers to embed their own data in the file. A fit 1 reader that ignores the version number will happily read in a fit 2 file if it does not have embedded developer data, however it will keel over if there is embedded data.

The only change required to cope is in each record to check for a flag and read the number of bytes to skip and then skip these.

My current garmin device, a 1030 plus, produces v1 fit files but I cannot rule out the possibility that if it were linked to exotic other devices it might embed custom data and change the protocol number.

If someone has a sample .fit file from a wahoo to attach here it would be good.

That explains what I saw in the GPS Babel code then.
I can download some FIT2 files off my Elment if useful.