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

Support of Stages Powermeter #57

Closed
pueroman opened this issue Nov 16, 2015 · 11 comments
Closed

Support of Stages Powermeter #57

pueroman opened this issue Nov 16, 2015 · 11 comments
Assignees
Labels

Comments

@pueroman
Copy link

When using Stages power meter instead polar or srm only one side of power (left power) is distributed.
Two problems when exporting to hrm-file:

  1. PPT 5 only reading correct power data when SMode contains:
    d) Power = 1
    e) Power Left Right Balance = 1
    f) Power Pedalling Index = 1
    (don't know why, but tested it with different files)
  2. Download-file of V800 does only contain power of one crankarm (left side), so correct power data is
    "currentPower = currentPowerLeft * 2" (checked by comparing with tcx-export from polar flow web)
@pcolby pcolby self-assigned this Nov 17, 2015
@pcolby
Copy link
Owner

pcolby commented Nov 17, 2015

Hi @pueroman,

If you could provide a couple of data files with Stages power meter data included, that would make development / testing much easier for me (otherwise we'll just have to do the "try this" ... "didn't quite work" ... "try this one instead" cycle, which can be quite a bit slower).

Ideally, you would provide data files that you don't mind making public (eg not a ride to/from your house?), in which case I'll include them in Bipolar's unit tests. But I can still use them for testing even if you don't want to make them public.

To provide the data files, pick / record a session on flow.polar.com, look at the session number in the URL, then find all of the files in the export directory (eg C:\Users\pueroman\AppData\Local\Polar\PolarFlowSync\export) that match the pattern v2-users-*-training-sessions-<session-id>-*. Either attach those files to a comment here (that will make them public), or email them to me at git at colby dot id dot au. Ideally zip them first, but it shouldn't hurt if you don't.

Also, it sometimes helps if you make the corresponding activity public on flow.polar.com, just so I can compare the Bipolar outputs against whatever flow.polar.com is saying, but that isn't necessary.

Cheers.

@pcolby
Copy link
Owner

pcolby commented Nov 19, 2015

Hi @pueroman, I got your test data via email. Thanks 😄

At a glance it looks good (ie it is valid Protocol Buffers data).

Hopefully I'll get a chance to play with it this weekend 😄

Are you happy for me to include the test data in the Bipolar project's test data suite? (https://github.com/pcolby/bipolar/tree/master/test/polar/v2/testdata) That way it would be included in automated tests that run every time code is pushed to github (and when running tests locally). This isn't necessary, but does reduce the chance of whatever fixes I implement being broken some time in the future. I can still fix the issue without adding the data to the tests, so just let me know if you're happy for me to do so or not.

Cheers.

@pueroman
Copy link
Author

Hi,
you can use the data for the tests. If possible cut off the gps data, if not it's also o.k.

@pcolby
Copy link
Owner

pcolby commented Nov 19, 2015

Ok great. I'll leave out the *-route data, since that's the one that includes the GPS samples, and isn't affected by the power code tweaks I'll be making.

pcolby added a commit that referenced this issue Nov 23, 2015
This includes data from a Stages Power meter, which the V800 only
records on one side, resulting in Bipolar reporting incorrect power
values (issue #57).

This data will soon be used to test / prove the fixes to that issue.

Note, this is a verbatim copy of a sub-set of data provided by
@pueroman - specifically, the `*-route` and `*-finalize` data files
have been omitted (neither are necessary for fixing issue #57).
pcolby added a commit that referenced this issue Nov 23, 2015
This includes the "expected" outputs which exhibit the existing issue.
The next change(s) should fix the issue, and show the difference that
the fix introduces into the generated data.
pcolby added a commit that referenced this issue Nov 23, 2015
Specifically, as the V800 only reports power for the left side when
using Stages power meters, the total output power samples ought to be
doubled.

Note, this implementation has a positive side-effect of causing 0-value
power samples to be included in the generated TCX files, where
previously such samples where being erroneously discarded as "no data".
pcolby added a commit that referenced this issue Nov 24, 2015
Specifically, as the V800 only reports power for the left side when
using Stages power meters, the total output power samples ought to be
doubled.
@pcolby
Copy link
Owner

pcolby commented Nov 24, 2015

@pueroman, this is probably fixed now... the TCX output seems right (as loaded into Strava), but I don't have access to PPT right now (not near my Windows machine) to test the HRM ouput.

I haven't yet set the HRM pedalling index, since that goes against the HRM spec. But it wouldn't be the first time PPT 5 needed something against the spec, so I'll enable that if testing shows its still needed.

If you're keen, you can test the generated TCX and/or HRM output via the unit test output files:

Or if you happen to use Windows, you can try the latest build from AppVeyor (the Windows automated build system I use for Bipolar):

I should be able to test against PPT 5 later in the week. Then I'll look at doing an official release for Windows and OSX.

Cheers.

@pueroman
Copy link
Author

Did a quick test with PPT 5 (release 5.41.002).
Used file .../testdata/training-sessions-267510822.hrm
Data not readable when importing it. Changed pedalling index to 1. Imported again. Everything fine then. Power data correct now.
Seems like PPT has another bug.
Cheers

@pcolby
Copy link
Owner

pcolby commented Nov 26, 2015

Righto. I'll enable the Power Pedalling Index SMode flag (f) whenever the "Power Balance and Pedalling Index" field is present (ie whenever power data is present). Though of course the pedalling index value itself will always be 0 for now (since the V800 doesn't appear to support that data).

pcolby added a commit that referenced this issue Nov 26, 2015
We do this any time power data is available, even though we get no such
pedalling index data from the V800.

This is being done for PPT5's benefit (does anyone use HRM files with
anything else?).
@pcolby
Copy link
Owner

pcolby commented Nov 26, 2015

I'll enable the Power Pedalling Index SMode flag (f) whenever the "Power Balance and Pedalling Index" field is present (ie whenever power data is present).

Done. You should be able to test latest file(s) from the same URL(s). Otherwise I'll take a look on the weekend.

Cheers.

@pueroman
Copy link
Author

pueroman commented Dec 2, 2015

Been able to do the tests today. Everything seems to be fine now. Also compared data with tcx file in golden cheetah. No errors found.

@pcolby
Copy link
Owner

pcolby commented Dec 2, 2015

That's great news! 😄

I'm going to update the Flow Sync hook for issue #60 and then do a release.

@pcolby
Copy link
Owner

pcolby commented Dec 16, 2015

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

No branches or pull requests

2 participants