Pitmairen / bryton-gps-linux

An attempt to read Bryton GPS devices on Linux
GNU General Public License v3.0
29 stars 14 forks source link

spoof device type for improved strava support #5

Closed trsaunders closed 11 years ago

trsaunders commented 11 years ago

It annoys me that strava throws away the elevation data from my rider 35 and uses its elevation heightmap which is often quite wrong. I'd rather it trusted my data, but it seems it only does that for known devices.

So what if we modifed the strava upload to make it look like e.g a Garmin Edge 500?

has anyone tried this?

Pitmairen commented 11 years ago

I find this annoying too.

I think strava will only use the elevation data when it is uploaded directly through the Garmin Communicator Plugin. It should be possible to create a fake Garmin Communicator Plugin API and then fake a garmin device, but i don't know how hard it will be. But i will have a look at it and try to figure out how the plugin works.

trsaunders commented 11 years ago

This looks very useful: https://strava.zendesk.com/entries/21542886-Import-Garmin-HR-Cadence-data-from-Garmin-GPX-files

I'll see what it does to a GPX to make strava trust the altimeter.

Pitmairen commented 11 years ago

Nice! It seems to be working.

All that is needed is to add a Creator and Author element to the tcx file. I did try this before but maybe some of the values i used was incorrect.

But it works with the values:

  <Creator xsi:type="Device_t">
    <Name>Garmin Edge 800</Name>
    <UnitId>9999999</UnitId>
    <ProductID>1169</ProductID>
    <Version>
      <VersionMajor>0</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <BuildMajor>0</BuildMajor>
      <BuildMinor>0</BuildMinor>
    </Version>
  </Creator>
  <Author xsi:type="Application_t">
    <Name>Garmin Device</Name>
    <Build>
      <Version>
        <VersionMajor>3</VersionMajor>
        <VersionMinor>4</VersionMinor>
        <BuildMajor>0</BuildMajor>
        <BuildMinor>0</BuildMinor>
      </Version>
    </Build>
    <LangID>en</LangID>
    <PartNumber>006-D2449-00</PartNumber>
  </Author>
Pitmairen commented 11 years ago

I have added this now. It will now automatically upload as a Garmin Edge 800 when uploading to strava and there is a new option --fake-garmin when exporting tcx files.

Thanks for letting me know about this, the elevation graph looks a lot better now :)

trsaunders commented 11 years ago

Hurrah, it works brilliantly: http://app.strava.com/activities/49446938

Now I no longer have to find my laptop whenever I want to upload my rides to strava :dancers:

thanks for your quick work!

trsaunders commented 11 years ago

It seems like the altitude is relative - in the ride I linked above it is all out by about 50m. I think if the average gps altitude over the entire ride is added to each elevation reading then they will be much closer to the true value

Pitmairen commented 11 years ago

Did you calibrate the device before the ride?

At least with the Rider40 i have to calibrate the altitude before each ride.

trsaunders commented 11 years ago

Good point, I did not do that - I'm so used to strava completely ignoring the barometer that I have as well!

On Thu, Apr 18, 2013 at 10:12 PM, Pitmairen notifications@github.comwrote:

Did you calibrate the device before the ride?

At least with the Rider40 i have to calibrate the altitude before each ride.

— Reply to this email directly or view it on GitHubhttps://github.com/Pitmairen/bryton-gps-linux/issues/5#issuecomment-16610460 .