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

Ability to download R-R file for orthostatic tests #39

Open
dfeist opened this issue Oct 4, 2014 · 10 comments
Open

Ability to download R-R file for orthostatic tests #39

dfeist opened this issue Oct 4, 2014 · 10 comments
Assignees

Comments

@dfeist
Copy link

dfeist commented Oct 4, 2014

No description provided.

@pcolby
Copy link
Owner

pcolby commented Oct 6, 2014

I just did a quick orthostatic test and R-R recording from the Tests menu, and synced with debug hook. The debug output log included the following:

...
Tue 7. Oct 07:47:39 2014 urlPath /v2/users/1076194/tests/orthostatic-tests/create
Tue 7. Oct 07:47:40 2014 urlPath /v2/users/1076194/tests/orthostatic-tests/126112/rrsamples
Tue 7. Oct 07:47:56 2014 urlPath /v2/users/1076194/tests/rr-recordings/create
Tue 7. Oct 07:47:57 2014 urlPath /v2/users/1076194/tests/rr-recordings/20467/rrsamples
...

So it looks like the R-R recordings are submitted under .../tests/rr-recordings, and probably won't be difficult to capture / export. 😄

What format would make sense to export this data to?

@dfeist
Copy link
Author

dfeist commented Oct 6, 2014

I didn't see them, but will try again.

As for export format, polar .hrm file probably makes sense initially given i) it's supported by most tools including 'Polar ProTrainer 5' ii) i assume most of the work is already donde given .hrm R-R output is already supported for training exercises.

That said, the format that Polar have chosen to support for exporting R-R session from Flow (recently added functionality) is plain text. They have not added the same for orhtostatic tests though.

@pcolby
Copy link
Owner

pcolby commented Oct 6, 2014

I didn't see them, but will try again.

You won't see any yet. The debug hook simply logs additional requests that it sees, but neither the debug hook nor the official hook actually record any data other than those that match a ../training-sessions/.. pattern.

I will need to update the hook to also record the .../tests/... data (might add a couple of other things while I'm at it).

As for export format, polar .hrm file probably makes sense initially given i) it's supported by most tools including 'Polar ProTrainer 5' ii) i assume most of the work is already donde given .hrm R-R output is already supported for training exercises.

Works for me. Yeah, should be pretty easy since most of the code is already in place.

That said, the format that Polar have chosen to support for exporting R-R session from Flow (recently added functionality) is plain text.

Thats interesting. I haven't seen any R-R export options in Flow yet... can you point me to where that option is? I'd like to add an equivalent plain-text export to Bipolar.

pc.

@pcolby pcolby self-assigned this Oct 6, 2014
@dfeist
Copy link
Author

dfeist commented Oct 6, 2014

Once you've uploaded a R-R recording go to https://flow.polar.com/training/test/rr/{id} and there is an export button on the top left.

See: http://updates.polar.com/2014/09/rr-recording-test-data-now-available-in-flow-for-v800-users/

Rather than take separate R-R recordings I'd like to analyze further the results from my orthostatic tests.

Format is like this:
0.000 2.183
2.183 2.183
2.663 0.48
3.153 0.49
3.641 0.488
4.126 0.485
4.581 0.455
11.461 0.462
11.93 0.469
12.395 0.465
12.857 0.462
13.323 0.466
13.79 0.467

@pcolby
Copy link
Owner

pcolby commented Oct 6, 2014

Once you've uploaded a R-R recording go to https://flow.polar.com/training/test/rr/{id} and there is an export button on the top left.

Ah, I see. I was looking in Diary -> Recovery Status, not Diary -> Diary.

Format looks pretty clear. First column is absolute time offset for the first R wave, and the second column is the interval between the first and second R waves.

I'll add an option to export this data for training activities too 😄

Thanks.

@dfeist
Copy link
Author

dfeist commented Oct 7, 2014

This data for training/r-r recording would be great too, But IMO most important is R-R data from orthostatic tests, as there is currently no other way to get this data.

Just thinking, maybe there is some interesting data in the fitness test file ;-)

pcolby added a commit that referenced this issue Oct 8, 2014
@pcolby
Copy link
Owner

pcolby commented Oct 8, 2014

Just FYI, I've updated the hook to capture fitness test data. If you're keen, you can install it already, then when the app's updated, you'll have some test data to convert (and if you're really really keen, you an use protoc to view the raw data in the meantime).

I've only uploaded the hook in Windows DLL form for now; OSX will come shortly (not sure which you're using).

Either way, there's still a bit of work to do make the GUI app use the new data.

Cheers.

@pcolby
Copy link
Owner

pcolby commented Oct 8, 2014

Forgot to mention, the updated hook is at: https://github.com/pcolby/bipolar/releases/tag/hook-2

@rgeorge1985
Copy link

rgeorge1985 commented Aug 4, 2017

Hello @pcolby

Bit late to the party. I raise a similar issue with Bipolar not being able to recognize V800 R-R test files which are in .txt format. Was there a fix to this in the end? Can someone please guide me? I'm looking to convert the .txt to .hrm format. When I open the .txt file, the first few lines are as follows :

0.000 0.831
0.831 0.831
1.676 0.845
2.524 0.848
....
....

@pcolby
Copy link
Owner

pcolby commented Aug 11, 2017

Hi @rgeorge1985,

Sorry, forgot all about this one. As far as I can, where we got to, is that the R-R data was being captured (by the debug hook), then was broken by Polar (#42), then finally fixed again in Nov 2016.

So currently, it should be possible to update Bipolar to capture and export R-R test data to *.txt pretty easily. HRM should be fine too, as long as the necessary metadata is available in the /v2/users/1076194/tests/{orthostatic-tests,rr-recordings}/create data files and we can crack their protobuf schemas.

The biggest problem, is probably that the code for parsing, and generating the HRM files is currently within the TrainingSession class, but for this, much of those probably needs to be ripped out into separate classes that can be shared with new OrthoTest and RrRecordings classes...

And personally, I'd want to integrate the v800_downloader project into Bipolar first, since that will be much harder to do post any TrainingSession changes.

If you want the quick option, since the data is so simple, you should be able to parse the captured data and generate a HRM file using a basic script, with the protoc command. But to do it properly, will take a fair bit of time (it's something I want to do, but like so many things, I have to fit in between lots of other work).

Sorry for the less-than-simple answer.

Cheers.

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