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

Problem with R-R data #42

Closed
ArtMag opened this issue Dec 3, 2014 · 7 comments
Closed

Problem with R-R data #42

ArtMag opened this issue Dec 3, 2014 · 7 comments

Comments

@ArtMag
Copy link

ArtMag commented Dec 3, 2014

I have problem with export R-R data from Polar FlowSync (V800, wer. 2.3.8). Bipolar (0.3.1.520) still created file HRM but no R-R data recorded.

@pcolby
Copy link
Owner

pcolby commented Dec 4, 2014

Hi @ArtMag,

The first thing to do is check whether Bipolar has captured any *-rrsamples files. Assuming Windows, these would be in directory like C:\Uses\<user>\AppData\Local\Polar\PolarFlowSync\export. There's a number of reasons why the V800 may not record R-R samples; for example, if it silently fell back to using the H7 sensor's 5kHz mode.

I've just checked my own captured V800 data, and it appears that Bipolar stopped seeing R-R data just after 2014-11-15 (no code changes around this time). This corresponds with the V800 1.2. firmware release, so its possible that firmware update changed / broke / disabled R-R export in some way. 😦

I'll investigate. Thanks.

@ArtMag
Copy link
Author

ArtMag commented Dec 5, 2014

Hi pcolby
Thank you for your answer. I havent got any *-rrsamples in directory C:\...\export after 27.11.2014. I saw that in not only my problem (Polar Forum » Discussions on heart rate monitors » V800 » Bipolar open-source project) after V800 1.2. firmware release :(. Ill waiting for results of your investigation. Bipolar still gives better possibilities to export data than Polar Flow offers.

@pcolby
Copy link
Owner

pcolby commented Dec 18, 2014

Just a small update.

So far I've not been able to find an R-R data being exported since the 1.2 firmware release 😦

I will try an actual R-R recording session soon, just in case that gives any hints to what Polar changed (they may have dropped R-R from exercise sessions, or they may have reformatted / included it with one of the other data files?) 😕

@MHatGH
Copy link

MHatGH commented Nov 14, 2016

hi,
I think it is not necessary to record a separate RR-Session.
In Bipolar "QVariantMap TrainingSession::parseSamples(QIODevice &data) const"
you got this unused record "28".
I gues this containes RR-Samples used to calc the heard rate from.
Adding the following to the QVariantMap, works for me (not checked in detail but gives meaningful result at first glance, Thanks to rsc-dev/loophole, I got the idea from).

I use M400 and try to calc training-zones from this values. Likely to older "OwnZone" feature.

ADD_FIELD_INFO("28"  ,    "RRSample",                 EmbeddedMessage);     //RR-Sample Section
ADD_FIELD_INFO("28/1",    "RRvalue",                   Uint32);                           //RR-value - if not offline
ADD_FIELD_INFO("28/2",    "RRoffline",                EmbeddedMessage);     //RR-offline event
ADD_FIELD_INFO("28/2/1",  "starttime",                EmbeddedMessage);     //offline starts at lap-time
ADD_FIELD_INFO("28/2/1/1","hour",                     Uint32);              //start-hour
ADD_FIELD_INFO("28/2/1/2","minute",                   Uint32);              //start-minute
ADD_FIELD_INFO("28/2/1/3","second",                   Uint32);              //start-second
ADD_FIELD_INFO("28/2/1/4","milliseconds",             Uint32);              //start-milliseconds
ADD_FIELD_INFO("28/2/2"  ,"duration",                 EmbeddedMessage);     //offline duration
ADD_FIELD_INFO("28/2/2/1","hour",                     Uint32);              //duration-hour
ADD_FIELD_INFO("28/2/2/2","minute",                   Uint32);              //duration-minute
ADD_FIELD_INFO("28/2/2/3","second",                   Uint32);              //duration-second
ADD_FIELD_INFO("28/2/2/4","milliseconds",             Uint32);              //duration-milliseconds

@pcolby
Copy link
Owner

pcolby commented Nov 15, 2016

Cool! Thanks @MHatGH!

If what you're saying is correct, then it means that sometime back around V800 1.2 firmware release Polar moved the R-R sample data from a standalone rrsamples file a new field (28) in the samples data instead. If that's the case, then I'll definitely be able to update the app to use it.

😄

@MHatGH
Copy link

MHatGH commented Nov 15, 2016

my pleasure !

With M400 the user do not have the Option for recording RR-Intervalls at all.
There is just an "Fitnes Test", wich records them for a 2-3min period.
But this results are stored in a separate RRSample file in a /FT - Folder on the device under the currecnt day.

So please do not delete this functionality of converting RRSample files, maybe there could be an application in future.

@pcolby
Copy link
Owner

pcolby commented Nov 16, 2016

So please do not delete this functionality of converting RRSample files

Understood! I'll add support the new field, while maintaining the existing support too 😄

pcolby added a commit that referenced this issue Nov 16, 2016
Thanks to @MHatGH for pointing out that rsc-dev/loophole project's
protobuf definition files include the specification for this field.
pcolby added a commit that referenced this issue Nov 17, 2016
As explained in the added code comments, sometimes Polar devices
generate a separate rrsamples data file which is just a flat list of
R-R intervals.  However, other times, Polar devices include HRV data
interspersed with other exercise sample data.

With this change, the TrainingSession::toHRM function will use the
separate rrsamples file when available (existing behaviour), and
fallback to using the HRV data dispersed throughout the execerise data,
if present.

Note, other output formats, such as GPX and TCX do not include
heartrate variability (HRV) data, so those are unaffected.

Finally, this change also fixes a minor issue that prevented unit tests
recording temporary debug data for `*.rr.hrm` files in some cases.
@pcolby pcolby closed this as completed Dec 29, 2016
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

3 participants