polarofficial / polar-ble-sdk

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

Gyroscope frequency? #439

Closed zemmyang closed 4 months ago

zemmyang commented 4 months ago

Platform your question concerns:

Device:

Description:

(I don't think the platform is relevant, although I am testing on an Android device. I am also using an unofficial Flutter wrapper, but this question seems to be more appropriate here.)

When I try to get the gyroscope data, I'm receiving 1 log entry per second, but the amount of data I get appears to vary between log entry - sometimes it's 130, sometimes it's 55, etc. From the documentation, the freq of the gyroscope is 52Hz. Am I supposed to concatenate the samples together to get the "correct" gyroscope data? If that was the case, shouldn't I still be receiving the same data per second?

ps: If it matters, I'm only shaking/tilting the sensor in my hand slowly as I test it.

jimmyzumthurm commented 4 months ago

Hi @zemmyang ,

The amount of data between each data frame packet varies as samples are compressed using delta compression. The less the sensor is moving, the more samples you will receive with each frame as the device only sends the frame to the client when it is filled with MTU size of data (232 bytes max).