Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between data from CMPedometer and HealthKit

The following chart lists my step data from HealthKit vs. the CMPedomoter class:

    HealthKit   CMPedometer  difference
1   2710        2681         -29
2   2569        2580          11
3   2367        2312         -55    
4   1326        1311         -15
5   2728        2711         -17
6   860         886           26
7   6293        6299           6

There is a slight difference each day between the two. Does anyone know why this might be the case? No other app is writing step data currently to this device.

like image 856
John D. Avatar asked Jun 08 '15 00:06

John D.


People also ask

Is Apple health the same as HealthKit?

HealthKit is the developer framework behind it that allows apps to work with Apple Health and each other. If you're confused about how the Apple Health app works, what type of information you need to get the most out of it, and which apps are compatible, keep reading.

Where is HealthKit data stored?

To quote: This data is stored in Data Protection class Protected Unless Open. Access to the data is relinquished 10 minutes after device locks, and data becomes accessible the next time user enters their passcode or uses Touch ID or Face ID to unlock the device.

What is HealthKit on Apple Watch?

HealthKit provides a central repository for health and fitness data on iPhone and Apple Watch. With the user's permission, apps communicate with the HealthKit store to access and share this data.


1 Answers

Problems is that all steps has Float value so for example in real could be:

time - pure data - after round
1:05 - 0.95 steps - 1 steps 
1:15 - 1.25 steps - 1 steps 
1:25 - 14.75 steps - 15 steps 
1:45 - 1.95 steps - 2 steps 
2:05 - 4.65 steps - 5 steps 
2:15 - 11.25 steps - 11  steps 

and if you sum it like integer you will get 31 steps and if you round it before you will get 35

also had this issue when synch data from pedometer and health kit

like image 153
Arkhyp Koshel Avatar answered Oct 21 '22 23:10

Arkhyp Koshel