polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

Help regarding understanding visualisation of ECG data and ACC data #433

Closed gd1925 closed 4 months ago

gd1925 commented 5 months ago

Platform your question concerns:

Device:

Hello everyone,

I'm working with data from the Polar H10 and I have a question regarding the visualization of ECG and ACC data.

The ECG data is sampled at 130 Hz and the acceleration data at 200 Hz. In one packet of data from polar, I receive 72 ECG values and 31 values each for x, y, and z acceleration (93 in total). To get the full data, I am planning on stitching data from consecutive 2 packets together, resulting in approximately ~150 data points for ECG and around 200 data values for acceleration data.

My question is: What are the recommended methods or best practices for visualizing this type of stitched data? I am interested in both time series plots or any other effective visualization techniques that would help in analyzing the movement of ecg and acc data.

Also if someone can give some insights on : How to align and represent these two different data streams with their different sampling rates? Are there any specific tools/libraries/documentation/examples that could guide me in visualizing this data accurately and effectively?

Any insights or guidance you can provide would be super useful. Thank you for your time and assistance.

jimmyzumthurm commented 5 months ago

@gd1925 Hi,

Device sends a data frame each time it fills it with TX MTU size of data. Each frame as a timestamp attached, and the Polar BLE SDK then calculates a timestamp for each individual samples based on the frame timestamp. For example in iOS : https://github.com/polarofficial/polar-ble-sdk/blob/c505d8fc3a0388dd27c406cda66b62bc567e43d7/sources/iOS/ios-communications/Sources/iOSCommunications/ble/api/model/gatt/client/pmd/model/EcgData.swift#L8 ECG data sample as a timestamp attached that you can access.

The timestamp is the amount of nanoseconds since 2000.01.01 0:00:00 UTC time