{"id":23152750,"url":"https://github.com/michaeltroger/simple-stair-detection","last_synced_at":"2025-08-17T20:33:08.092Z","repository":{"id":44895186,"uuid":"104137668","full_name":"michaeltroger/simple-stair-detection","owner":"michaeltroger","description":"Simple stair (and movement) detection for Android","archived":true,"fork":false,"pushed_at":"2017-10-16T20:10:03.000Z","size":650,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T15:50:55.914Z","etag":null,"topics":["activity-detection","activity-recognition","android-application"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaeltroger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-19T22:53:16.000Z","updated_at":"2024-10-13T17:03:00.000Z","dependencies_parsed_at":"2022-08-01T02:19:01.882Z","dependency_job_id":null,"html_url":"https://github.com/michaeltroger/simple-stair-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michaeltroger/simple-stair-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fsimple-stair-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fsimple-stair-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fsimple-stair-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fsimple-stair-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaeltroger","download_url":"https://codeload.github.com/michaeltroger/simple-stair-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fsimple-stair-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270902532,"owners_count":24665279,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["activity-detection","activity-recognition","android-application"],"created_at":"2024-12-17T19:18:42.799Z","updated_at":"2025-08-17T20:33:07.661Z","avatar_url":"https://github.com/michaeltroger.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple stair (and movement) detection for Android\n\n\u003cimg src=\"/screenshot.png\" alt=\"Simple stair detection\" width=\"400px\"/\u003e\n\nThis app demonstrates a simple approach for activity recognition without any Machine learning involved. The app requires an accelerometer sensor as well as an barometer sensor in order to function!\n\nIt is able to detect _movement_ (like walking) as well as stair climbing.\n\nFor movement detection the following algorithm is used:\n1. Get linear acceleration vector\n2. Calculate the length of the acceleration vector: vectorLength = √(accX² + accY² + accZ²)\n3. Calculate the EWMA of this length: ewma(i) = 𝛼 * vectorLength + (1 - 𝛼) * ewma(i-1)\n4. Check the EWMA for a certain threshold\n\nFor stairs detection the following algorithm is used:\n1. Get pressure data\n    - Remember the initial pressure (only on 1st call)\n2. Calculate the EWMA of this data\n3. Check whether the device is moving (movement detection algorithm from before)\n    - Subtract the EWMA from the remembered pressure data\n    - Take its absolute value and check it for a certain threshold\n    - Save the EWMA for the next threshold comparison\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltroger%2Fsimple-stair-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaeltroger%2Fsimple-stair-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltroger%2Fsimple-stair-detection/lists"}