{"id":24777516,"url":"https://github.com/rootcircle/beaconify","last_synced_at":"2025-04-09T23:52:14.577Z","repository":{"id":262267140,"uuid":"886716127","full_name":"rootCircle/Beaconify","owner":"rootCircle","description":"An android app to enable indoor navigation using BLE Beacons","archived":false,"fork":false,"pushed_at":"2024-11-22T17:58:24.000Z","size":206,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T23:52:10.866Z","etag":null,"topics":["afc","altbeacons","beacons","ble","bluetooth","positioning"],"latest_commit_sha":null,"homepage":"https://github.com/rootCircle/BeaconifyStore","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootCircle.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-11T13:29:28.000Z","updated_at":"2025-03-21T05:00:39.000Z","dependencies_parsed_at":"2025-01-29T07:51:32.558Z","dependency_job_id":"b9d81576-0f26-4c85-a0de-59db265fe98c","html_url":"https://github.com/rootCircle/Beaconify","commit_stats":null,"previous_names":["rootcircle/beaconify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootCircle%2FBeaconify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootCircle%2FBeaconify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootCircle%2FBeaconify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootCircle%2FBeaconify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootCircle","download_url":"https://codeload.github.com/rootCircle/Beaconify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131454,"owners_count":21052819,"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":["afc","altbeacons","beacons","ble","bluetooth","positioning"],"created_at":"2025-01-29T07:51:25.070Z","updated_at":"2025-04-09T23:52:14.553Z","avatar_url":"https://github.com/rootCircle.png","language":"Kotlin","readme":"# Beaconify\n\nA **Bluetooth Low Energy (BLE)** beacon management and location tracking application built using **Kotlin** and **Jetpack Compose**. The app allows users to register and transmit virtual beacons, track their location using nearby beacons, and visualize their position on an interactive map. The app uses a **two-step approach** that leverages **Affinity Propagation Clustering (APC)** for accurate location prediction.\n\n## Features\n\n- **Beacon Registration \u0026 Transmission**:\n  - Register and transmit BLE beacons using UUID, Major, and Minor values.\n  \n- **Two-Step Location Prediction**:\n  - **Offline Clustering**: Collect and cluster beacon data to establish baseline reference points using APC.\n  - **Online Location Refinement**: Dynamically adjust user location predictions using real-time beacon data.\n  - **Exponential Averaging**: Smooth location predictions over time for more consistent accuracy.\n\n- **Interactive Map**:\n  - View real-time user location and surrounding beacon positions on a dynamic map.\n\n## Technical Workflow\n\n### Location Prediction Process\n\n1. **Offline Clustering**:\n   - Static beacons provide reference points for the initial clustering phase.\n   - Beacon signals are processed and grouped using **Affinity Propagation Clustering (APC)** to create initial location predictions.\n\n2. **Online Location Refinement**:\n   - The app continuously scans for nearby beacons and refines the user's location based on signal strength and proximity.\n   - **Exponential Averaging** is applied to smooth out location predictions over time, helping avoid sudden jumps or instability in the predicted position.\n\n\n\n## Help Setting Up (**Latitude and Longitude Calculation**):\n\nTo convert beacon proximity data into geographic coordinates, we use a **Modified Haversine Algorithm**. Here's an example Python implementation to demonstrate the concept:\n\n```python\nimport math\n\ndef meters_to_latlon(x, y, lat_ref, lon_ref):\n    # Earth's radius in meters\n    R = 6371000\n    \n    # Convert latitude\n    lat = lat_ref + (y / R) * (180 / math.pi)\n    \n    # Convert longitude\n    lon = lon_ref + (x / (R * math.cos(math.radians(lat_ref)))) * (180 / math.pi)\n    \n    return lat, lon\n\n# Example usage:\nlat_ref = 0  # Example reference latitude\nlon_ref = 0  # Example reference longitude\nx = 5.7  # 5.7 meters East\ny = 9.5  # 9.5 meters North\n\nlat, lon = meters_to_latlon(x, y, lat_ref, lon_ref)\nprint(f\"Latitude: {lat: .6f}\")\nprint(f\"Longitude: {lon: .6f}\")\n```\n\nThis function converts x and y (in meters) into latitude and longitude based on a reference location.\n\n\n\n## Architecture and Technology Stack\n\n- **Programming Language**: Kotlin\n- **UI Framework**: Jetpack Compose\n- **BLE Processing**: ALT Beacon format\n- **Location Prediction**: Affinity Propagation Clustering (APC)\n- **Backend Store**: [Beaconify Backend](https://github.com/rootCircle/BeaconifyStore)\n\n\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/rootCircle/Beaconify.git\n   cd Beaconify\n   ```\n\n2. Open the project in **Android Studio**.\n\n3. Sync the project with Gradle dependencies.\n\n4. Ensure your device runs **Android 8.0 (API Level 26)** or higher, with BLE support.\n\n5. **Run the app** on a physical device.\n\n### Important Note for Backend Setup\n\nTo fully utilize the app, you need to set up the **BeaconifyStore** backend. The app relies on this backend to store beacon data and perform location tracking functions. \n\n#### Backend Setup\n\nIf you intend to run the app offline, make sure to have the backend set up and running. You can find the instructions for setting up **BeaconifyStore** in the **[BeaconifyStore README](https://github.com/rootCircle/BeaconifyStore)**. \n\nPlease follow the instructions in that README to get the backend ready for use with the mobile app.\n\n## Screenshots\n\n| Register Virtual Beacon | Beacon Transmit | Locate Yourself | Interactive Map |  \n|-------------------------|-----------------|-----------------|-----------------|  \n| ![Register Beacon](https://github.com/user-attachments/assets/dcd8fa68-5776-40ce-9a77-3a58d1feed4c) | ![Register Beacon Notification](https://github.com/user-attachments/assets/2d4ed27a-8006-41d6-af92-15d74e2cb9bc) | ![Empty Locate Me](https://github.com/user-attachments/assets/cbe1eead-7920-4c88-a60f-463d4ccb5668) | ![LocateMe Map](https://github.com/user-attachments/assets/49e678e6-cc69-4010-a4cc-d1cb3daa0fd8) |  \n\n| Location Prediction | Permission Prompts | Homepage |  \n|---------------------|-------------|----------|  \n| ![Active LocateMe](https://github.com/user-attachments/assets/1a441676-3fef-4a32-809b-4bbd65b4de20) | ![Prompt Permissions](https://github.com/user-attachments/assets/2a2a1a1a-23c5-441d-bf5c-d5756956ad90) | ![Homepage](https://github.com/user-attachments/assets/558111ef-5124-4be3-9861-f181755d83f5) |\n\n## Usage\n\n1. **Register a Beacon**:\n   - Navigate to the \"Register Beacon\" screen.\n   - Enter the beacon’s UUID, Major, and Minor values.\n   - Save the beacon data to the backend.\n   - Ensure you have at least **3 registered beacons** (or physical devices) in the network for accurate location prediction.\n\n2. **Locate Yourself**:\n   - Enable Bluetooth and location permissions on your device.\n   - Open the \"Locate Me\" screen to view your location on the map.\n   - See real-time updates of your latitude and longitude as well as nearby beacons and their locations.\n\n\n\n## Research Insights\n\nThis app uses a novel approach for beacon-based location prediction:\n- **Affinity Propagation Clustering (APC)** for beacon signal grouping and location prediction.\n- **Two-Step Location Prediction** to refine user location with both offline and online adjustments.\n- **Exponential Averaging** for smoother, more stable location predictions over time.\n\nFor a more in-depth explanation, refer to the [IEEE Paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=\u0026arnumber=8667640).\n\n\n\n## License\n\nThis project is licensed under the [Apache-2.0 License](LICENSE).\n\n\n\n## Contributions\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n\n\n## Acknowledgements\n\n- [AltBeacon Library](https://altbeacon.github.io/android-beacon-library/)\n- [Beaconify Backend](https://github.com/rootCircle/Beaconify)\n- Research inspired by [IEEE Paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=\u0026arnumber=8667640).\n\n\n\n### Contact\n\nFor questions or feedback, please reach out to \u003cdev.frolics@gmail.com\u003e.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootcircle%2Fbeaconify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootcircle%2Fbeaconify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootcircle%2Fbeaconify/lists"}