sdc
sdc

Reputation: 3011

How do you calculate steps per day from the iOS Health App export.xml

Given an export.xml file generated by the iOS Health App export feature, how do you calculate steps per day?

I have created an google spreadsheet to help illustrate the problem.

The spreadsheet has two tabs

I can't make sense of how Apple calculates the steps per day. I've summed up all data points starting on a given date, but that doesn't work.

Google Spreadsheet

Thanks in advance.

I posted the question here on Apple's support forms as well

Upvotes: 1

Views: 571

Answers (1)

Gerd Castan
Gerd Castan

Reputation: 6849

There might be multiple sources that count Steps at the same time.

In your case that's the iPhone and and a source called Connect.

When there is data from more that one source, Health App prioritizes.

In Health App -> Data -> Fitness -> Steps -> Sources you can prioritize which data Health App counts, when there is data from more than one source at the same time.

So at each point in time Health App takes the data from the source with highes priority for that data type.

P.S. Apples HealthKit statistics query (and Health App and Activity App) appear to prioritize within a given time interval. To my knowledge this time interval is undocumented and appears to be 15 minutes.

So if there is one step in these 15 minutes from a higher priority source, HK statistics query and Apples Apps ignore 1000 steps from a lower priority source.

Upvotes: 1

Related Questions