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

Power data export in hrm and tcx #43

Closed
Nickpolar opened this issue Dec 15, 2014 · 14 comments
Closed

Power data export in hrm and tcx #43

Nickpolar opened this issue Dec 15, 2014 · 14 comments

Comments

@Nickpolar
Copy link

I have been using the V800 downloader for a couple of days now and would like to ask if you have any plans to include power data in those file formats . Currently only cadence seems to be exported .

Polar Flows TCX export is the same - only cadence but no power curve . Power data from the V800 / Keo power bluetooth smart is there in full in Polar Flow webservice though .

@pcolby
Copy link
Owner

pcolby commented Dec 16, 2014

Hi @Nickpolar, Bipolar has "theoretical" support for power, in that its been implemented in a couple of places, but I have no data files to test it with (I don't have a power meter).

If you could provide a couple of data files with power included, I'd be more than happy to test / see why it doesn't work.

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 a session on flow.polar.com, look at the session number in the URL, then find all of the files in export directory (eg C:\Users\Nick\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.

Cheers.

@trimathias
Copy link

Hi,
I'm also very intrested in getting this to work as a just got myself a set of keo power bt pedals.

Attaching files for a very short session that should have power included. At least power is presented perfectly in flow. (no GPS route as it was done on a trainer).

Hope this helps. Just get back to me if you want some other files.

PS. Wasn't allowed to attach zipfiles here so I'll drop you an email. Let me know if you don't get it.

@pcolby
Copy link
Owner

pcolby commented Dec 29, 2014

Thanks @trimathias! 😄 That data looks really helpful 👍

I'll probably have a number of questions such as "what was the min / max power for this activity?". These will be easier for me if you could either make the activity public on the flow website, or make it available to followers only, and allow me to follow you. Otherwise, I'll just ask the questions here and/or via email.

The data appears to be reporting the minimum power as 87, and the max as 287. Does that sound right? (I assume these are in watts)

cat *-statistics | protoc --decode_raw | grep '^5 ' -A3
5 {
  1: 87
  2: 287
}

That, of course, is just summary stats. The more interesting part is the sample data. Looking at the sample data, I can see that your files include three new fields that I've not see before - they are indexed as 22, 24 and 28.

Field 28 appears to be structured data similar to the various other sensor-calibration fields, so I'm going to predict that it's "power-calibration" - either way, it only appears once or twice, so it not per-sample data, and not really interesting.

That's leaves 22 and 24 - both of which look promising... I'll have to play around to predict / guess they're formatting.

BTW, does the flow website report power in whole numbers? ie 200, 201? or does it show decimals such as 200.5?

Thanks again! 😄

@trimathias
Copy link

Hi Paul!

Nice to get a prompt reply from you. I made the session public in flow and
you should find it on

https://flow.polar.com/training/analysis/42261903

It's just a very short test of the keo pedals and no real workout. Guess
I'm saying this to justify the low watt numbers 😉 You're number seems to
be spot on. What I can see in flow it uses integers for the power.

Regarding the two channels you are mentioning. Could it be left and right
power? The keo pedals measure booth legs. Or maybe it is total watt and
some kind of distribution factor r/l. I'm really just guessing here, better
leave that to you the expert.

Don't hesitate to come back to me if I can help with more things. I owe you
big time for all the work you put in to the bipolar software!

Thanks!
Mathias
Den 29 dec 2014 22:35 skrev "Paul Colby" [email protected]:

Thanks @trimathias https://github.com/trimathias! [image: 😄] That
data looks really helpful [image: 👍]

I'll probably have a number of questions such as "what was the min / max
power for this activity?". These will be easier for me if you could either
make the activity public on the flow website, or make it available to
followers only, and allow me to follow you. Otherwise, I'll just ask the
questions here and/or via email.

The data appears to be reporting the minimum power as 87, and the max as
287. Does that sound right? (I assume these are in watts)

cat *-statistics | protoc --decode_raw | grep '^5 ' -A3
5 {
1: 87
2: 287
}

That, of course, is just summary stats. The more interesting part is the
sample data. Looking at the sample data, I can see that your files include
three new fields that I've not see before - they are indexed as 22, 24 and
28.

Field 28 appears to be structured data similar to the various other
sensor-calibration fields, so I'm going to predict that it's
"power-calibration" - either way, it only appears once or twice, so it not
per-sample data, and not really interesting.

That's leaves 22 and 24 - both of which look promising... I'll have to
play around to predict / guess they're formatting.

BTW, does the flow website report power in whole numbers? ie 200, 201? or
does it show decimals such as 200.5?

Thanks again! [image: 😄]


Reply to this email directly or view it on GitHub
#43 (comment).

@pcolby
Copy link
Owner

pcolby commented Dec 29, 2014

I made the session public in flow

Great! I can see there that the 87W, was the average (I said the minimum above).

It's just a very short test of the keo pedals and no real workout. Guess I'm saying this to justify the low watt numbers

Haha. Yeah, I done similarly pointless slow runs and things just to get test data. No judgement here 😜

Regarding the two channels you are mentioning. Could it be left and right
power? The keo pedals measure booth legs. Or maybe it is total watt and
some kind of distribution factor r/l.

Yep, could be either. Once I've decoded the numbers (they appear to be protobuf varints), they'lll hopefully match up to the flow website data.

@pcolby
Copy link
Owner

pcolby commented Dec 30, 2014

That's leaves 22 and 24 - both of which look promising... I'll have to play around to predict / guess they're formatting.

Both appear to be complex embedded protobuf messages... it will take a bit more figure out... 😐

@pcolby
Copy link
Owner

pcolby commented Jan 2, 2015

@trimathias, are you happy for me to include the test data you sent me in the Bipolar project's unit test data suite?

This would mean that every time someone commits code changes to this repo, the unit tests will verify the parsing and HRM/GPX/TCX generation from your power data automatically, to ensure nothing breaks over time. However, it also means that those files will be publically available from this repo (under the test/polar/v2/testdata directory).

(I can make the code work either way; including your data in the test suite just makes things a little easier for me)

Thanks.

@trimathias
Copy link

No, problem. Feel free to include the files in the test suite.
Den 2 jan 2015 05:33 skrev "Paul Colby" [email protected]:

@trimathias https://github.com/trimathias, are you happy for me to
include the test data you sent me in the Bipolar project's unit test data
suite?

This would mean that every time someone commits code changes to this repo,
the unit tests will verify the parsing and HRM/GPX/TCX generation from your
power data automatically, to ensure nothing breaks over time. However, it
also means that those files will be publically available from this repo
(under the test/polar/v2/testdata directory).

(I can make the code work either way; including your data in the test
suite just makes things a little easier for me)

Thanks.


Reply to this email directly or view it on GitHub
#43 (comment).

pcolby added a commit that referenced this issue Jan 2, 2015
This data represents a short indoor spin session, with Kéo Power
pedals, and will be used (shortly) to verify Bipolar's power support
(coming soon).
pcolby added a commit that referenced this issue Jan 2, 2015
This only tests against the existing (incomplete) power support, but
will show (in subsequent releases) the progression as power support
is added to Bipolar.
pcolby added a commit that referenced this issue Jan 2, 2015
Many thanks to @profanum429 for helping map the protobuf fields!
@pcolby
Copy link
Owner

pcolby commented Jan 3, 2015

Just a quick update: I've got power parsing working now (big thanks to @trimathias and @profanum429). Now I just need to include the parsed data in the relevant output files (HRM, GPX, TCX).

@pcolby pcolby added this to the 0.4.0 milestone Jan 3, 2015
pcolby added a commit that referenced this issue Jan 3, 2015
@pcolby
Copy link
Owner

pcolby commented Jan 3, 2015

HRM is done. TCX (via the Garmin Activity Extension) next.

pcolby added a commit that referenced this issue Jan 5, 2015
TCX has no support for power data per se, however, both the Garmin
Activity Extension (#31) and the Garmin Course Extension (#47) support
power data.  This change includes power data for both extensions.

Note, the Garmin Course Extension is currently not unit tested (will
add unit tests shortly).  Also, there are a few code paths added in
this change that cannot be tested until we get a data set that includes
*both* power data and lap data (#46).
@pcolby
Copy link
Owner

pcolby commented Jan 8, 2015

TCX power support done now too (along with a lot of other TCX and GPX extension data).

Just have to do some clean up, and prep for a new release 😄

@pcolby
Copy link
Owner

pcolby commented Jan 10, 2015

Included in Bipolar 0.4.0.

@pcolby pcolby closed this as completed Jan 10, 2015
@davidonribble
Copy link

Hi Paul. Okay brilliant now able to export power data to Golden Cheetah. wished I had your knowledge programming. Don't understand just why I can do this via Bipolar and not directly using the Flowsync export, may be when GC 3.11 is released this might be possible. however well done. Many Thanks

@trimathias
Copy link

Great job Paul 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants