Closed dara65 closed 8 months ago
good morning, I want to gather ECG data from Polar H10 and I'm using Ionic can you tell how to do it in Python so I can inspire from you? because I can only read HR and RR intervals.
Hello @dara65 , To reduce the data payload transmitted over the air, the data arrives in batches that contain several samples which are compressed into a buffer that is as big as the ATT_MTU of the connection allows. The data will be sent only after this buffer is full, thus the delay. The data is not completely real-time and this is why we provided timestamps with nanoseconds resolution to each sample so you can make fusion with other data.
@abdelkarimmamen check out this repo pypolartest.
@jimmyzumthurm would you tell me please what you mean by :
"you can make fusion with other data."
the RR intervals have no timestamp data and ACC is also transmitted with the same ATT_MTU size.
@dara65 My answer wasn't very clear. All raw data we transmit with our proprietary service (ACC, ECG, MAG, GYRO, PPG, ....) have the same timestamp basis (nanoseconds with 01.01.2000 00:00:00 UTC, assuming time was properly set using setLocalTime API beforehand) so I was meaning that especially. My comment about ATT_MTU was applying to those measurements and not R-R intervals.
R-R intervals are sent over BLE Heart Rate service which does not specify a timestamp field unfortunately.
@jimmyzumthurm Thank you. Is there any way/API to set the local time of the device using python?
@dara65 You would have to implement that functionality, as we do not provide official support for other platforms than iOS and Android. You can look at the implementation of this API in Kotlin/Swift code and port it to python, that should be possible.
Platform your question concerns:
Device:
Description:
I am using python (and Bleak) to collect, ECG, ACC and RR data from Polar H10. I noticed that there's a delay between starting notification and the start of data transmission (ECG and ACC) from the device. The delay is about 25-30 seconds after starting the notification and receiving data. Any idea why there's such delay and what the problem is?
Here's my device info:
I should note that I receive RR interval data with no delay, so I have a significant mismatch between my ECG and RR interval timestamp data.