read_moov_swim_bin: Load the MOOV sensor data from a swimming session

Description Usage Arguments Details Value Examples

Description

Find the "swimming_result.pb" for the given session id. Load and extract the part that contains sensor data.

Usage

1
read_moov_swim_bin(id, swimming_root)

Arguments

id

session ID, e.g., "swimming-k5y5pqbib17vbjqrh9gr16e"

swimming_root

path to the "swimming" folder (see the Details section)

Details

To use this function, you need to extract the "swimming" folder from your iOS backup. One solution is to use iExplorer (https://macroplant.com/iexplorer). (The free version allows you to extract unlimited number of files.) The swimming_root folder is in: /Applications/moov.core/Library/Application Support/user_data/( user id )/swimming

I haven't figured out the acutal meaning of the data. Heck, I don't know whether I extracted it correctly! However, preliminary plots shows that the data are periodic. The data seems like what we would get from accelerometer in lap swimming. The periodicity of strokes and laps are present in this data.

Known limitation: this code cannot parse recent swim logs that use different header. I already figured out the binary that marks the beginning of the log (see the source code). However, I haven't got around to add that part in code yet.

Value

a two-column tibble. 'x': sequence number, 'y': value from the binary

Examples

1
2
3
4
## Not run: 
read_moov_swim_bin("swimming-a2tj48knt09_f0pkqin8vnt", "data/swimming")

## End(Not run)

chatchavan/Moov documentation built on May 10, 2019, 5:17 a.m.