Add Fitbit support for iOS - #2016
Merged
Merged
Conversation
Four artifacts for the Fitbit iOS app: exercise locations, exercise sessions, heart rate and daily activity totals. The location points are the substantial part. Each is joined to the session it belongs to through the location group the record names, so a point carries the name and start time of the exercise it came from; on the tested device all 9,419 points joined to a named Run or Walk. The artifact emits KML. The dates in this database are stored two different ways and the difference matters. Location points and session start times are an eight byte value holding a big endian double of seconds since the 2001 Apple epoch, stored as a BLOB rather than as a numeric column, so the usual numeric conversion cannot read them. Heart rate samples in the same database are ISO text written by a different code path, and their dates coincide with the span the points cover, which corroborates the BLOB reading rather than leaving it asserted. A stored date far outside a plausible range is the app's own absent marker and is left empty rather than rendered as a first century date. Distances and speeds are reported as stored, because the records separately carry a unit system code and nothing in the extraction maps that code to a unit. Every copy of the database in the extraction is read rather than the first one found, so a device holding more than one app data container reports all of them; proven against a tree with two containers, which reported exactly twice the rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Fitbit support for iOS. Four artifacts: exercise locations, exercise sessions, heart rate and daily activity totals.
The locations are the substantial part: each point is joined to its exercise session through the location group the record names, and the artifact emits KML. On the tested device all 9,419 points joined to a named Run or Walk.
Dates are stored two different ways in this database. Location and session times are an eight byte BLOB holding a big endian double of Apple epoch seconds, so the usual numeric conversion cannot read them. Heart rate samples in the same database are ISO text written by a different code path, and their dates coincide with the span the points cover, which corroborates the BLOB reading rather than leaving it asserted. Dates far outside a plausible range are the app's absent marker and are left empty.
Distances and speeds ship as stored, because the records carry a unit system code that nothing in the extraction maps to a unit. Every copy of the database is read rather than the first found, proven against a two container tree.