{"id":20010630,"url":"https://github.com/bradhowes/motioncollector","last_synced_at":"2025-05-04T20:30:50.557Z","repository":{"id":77294663,"uuid":"215400148","full_name":"bradhowes/MotionCollector","owner":"bradhowes","description":"Simple iOS app to collect data from CoreMotion sensors.","archived":false,"fork":false,"pushed_at":"2024-01-01T20:32:38.000Z","size":623,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T11:43:34.226Z","etag":null,"topics":["coredata","coremotion","coremotion-sensors","icloud","ios","swift","swift5"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradhowes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"bradhowes"}},"created_at":"2019-10-15T21:29:24.000Z","updated_at":"2025-01-05T19:44:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a1664ed-7d9a-425f-93f9-35d2095ae3be","html_url":"https://github.com/bradhowes/MotionCollector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradhowes%2FMotionCollector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradhowes%2FMotionCollector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradhowes%2FMotionCollector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradhowes%2FMotionCollector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradhowes","download_url":"https://codeload.github.com/bradhowes/MotionCollector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252395192,"owners_count":21740985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coredata","coremotion","coremotion-sensors","icloud","ios","swift","swift5"],"created_at":"2024-11-13T07:20:56.650Z","updated_at":"2025-05-04T20:30:49.991Z","avatar_url":"https://github.com/bradhowes.png","language":"Swift","funding_links":["https://github.com/sponsors/bradhowes"],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/bradhowes/MotionCollector/workflows/CI/badge.svg)](https://github.com/bradhowes/MotionCollector/actions/workflows/CI.yml)\n[![COV](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bradhowes/9133ad2d68de2dc6b70abdb4ced9232b/raw/MotionCollector-coverage.json)](https://github.com/bradhowes/MotionCollector/blob/main/.github/workflows/CI.yml)\n![Swift](https://img.shields.io/badge/Swift-5.5-red.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-A31F34.svg)](https://opensource.org/licenses/MIT)\n\n# About MotionCollector\n\n![](https://github.com/bradhowes/MotionCollector/blob/main/MotionCollector/Resources/AppIcons/152px.png?raw=true)\n\nThis simple application records values coming from an iOS device's CoreMotion sensors (accelerometer, gyroscope,\nand magnetometer) and makes them available in a CSV formatted file in iCloud or iTunes (RIP). My goal in\ncreating this app was to allow for quick data collection while moving with the device. After collection, the\ndata would be processed with Apple's CoreML application for learning and (hopefully) future categorization of\nactivity based on sensor data.\n\nThe code works with Xcode 11 and Swift 5. Should work without problems with earlier versions, but the current\nstoryboard layout uses iOS 13 features. There would be minimal adjustments to make it work on older iOS\nversions.\n\n## Using\n\nThere are three views in this app:\n\n1. Main recording view with a _Start/Stop_ button and movement buttons.\n2. Recording history list that shows active and past event recordings. Swipe on a row to (re)upload, share, or\n   delete the recording.\n3. Settings view reachable from the main recording view via the _gear_ icon.\n\n![](images/Start.png?raw=true)\n\nPress _Start_ to begin a new recording of sensor data. Move around.\n\n![](images/Running.png?raw=true)\n\nWhen done, press _Stop_ to quit data collect. If _iCloud_ is enabled for the device, the app will attempt to copy the \nfile to your _iCloud Drive_, in a folder called _MotionCollector_.\n\n![](images/Recordings.png?raw=true)\n\nEach recording fie is named with the date/time when the recording started. They all have the suffix _.csv_ so\nyou should be able to open them in whatever editor or spreadsheet application you wish.\n\nDrag right on a recording to see controls for uploading and sharing the recorded values as a CSV file. Drag left to \nreveal a trash can to touch to remove the recording.\n\n## Configuration\n\nYou can control which components are samples for data capture, the rate of data capture, and if the files are stored in\nan iCloud folder.\n\n![](images/Settings.png?raw=true)\n\n## Data File Format\n\nThe file consists of lines of comma-separated values (CSV). The first line contains column labels for the rest\nof the rows.\n\n* Source -- indicates which sensor emitted the data.\n\u003e * A = accelerometer\n\u003e * D = device motion\n\u003e * G = gyroscope\n\u003e * M = magnetometer (compass)\n\n* Label -- indicates the current user activity, W = walking, T = turning\n* When -- timestamp of the record. These are given as number of seconds since 00:00:00 UTC 1 January, 1970 or\n  the Unix epoch, though the resolution of the values is much finer than a second.\n\nAll sensors emit at minimum three values, one for each of the 3 axis that define the orientation of the device\nin the real world.\n\n* X -- X axis sensor value\n* Y -- Y axis sensor value\n* Z -- Z axis sensor value\n\nFor the _device motion_ records (Source == 'D'), there are 9 values instead of 3.\n\n* X -- X axis rotation rate\n* Y -- Y axis rotation rate\n* Z -- Z axis rotation rate\n* UA_X -- X axis user acceleration\n* UA_Y -- Y axis user acceleration\n* UA_Z -- Z axis user acceleration\n* Pitch -- device rotation about the X axis\n* Roll -- device rotation about the Y axis\n* Yaw -- device rotation about the Z axis\n\nSee [this\npage](https://developer.apple.com/documentation/coremotion/getting_processed_device-motion_data/understanding_reference_frames_and_device_attitude)\nfor a discussion of the _pitch_, _roll_, and _yaw_ values and how they relate to the device.\n\n![](images/csv.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradhowes%2Fmotioncollector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradhowes%2Fmotioncollector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradhowes%2Fmotioncollector/lists"}