polarofficial / polar-ble-sdk

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

Timestamp in PolarHrData #356

Closed qerlly closed 1 year ago

qerlly commented 1 year ago

Platform your question concerns:

Device:

Description: Is it possible to add timestamp to PolarHrData? If you made the logic of streaming PolarHrData the same as PolarEcgData and PolarAccelerometerData, why do they have a timestamp and PolarHrData does not?

samulimaa commented 1 year ago

Hello, good question.

Reason why PolarHrData does not contain timestamp is due to fact that timestamps are not part of the BLE Heart Rate Service GATT specification:

3.4 Requirements for Time-Sensitive Data

The Heart Rate Measurement characteristic contains time sensitive data and is considered a time-sensitive characteristic, thus the following requirements apply:

Since this service does not provide for a time stamp to identify the measurement time (and age) of the data, the value of the Heart Rate Measurement characteristic shall be discarded if either the connection does not get established or if the notification is not successfully sent to the Client (e.g., link loss).