SMART-TRACE: A COMBINED RFID DATABASING AND WIFI-RSSI FINGERPRINTING INDOOR POSITIONING FOR DISASTER MANAGEMENT USING SMARTPHONE
๐ฏ This repository contains the full working materials for the SMART-TRACE thesis: backend, frontend, data collection, machine learning notebooks, and hardware experiments.
๐ Research paper: The published research is accessible at ResearchGate.
- ๐ก Indoor positioning using WiFi RSSI fingerprinting
- ๐ชช RFID databasing for tracking and identification
- ๐ฑ Smartphone-based client for disaster management scenarios
- ๐ Web + API backend (Django + PHP)
- ๐ง Machine learning (KNN-based fingerprinting and validation)
- ๐ CAPsMAN (MikroTik) used for centralized WiFi AP management and RSSI data acquisition
- WiFi RSSI fingerprinting โ Indoor location estimation using received signal strength from multiple access points
- RFID databasing โ Track and identify tagged persons or assets via RFID readers
- Disaster management focus โ Smartphone-based client for evacuation, triage, and situational awareness
- KNN-based ML positioning โ Train and run K-Nearest Neighbors models for fingerprint matching
- Interactive maps โ Leaflet + MapTiler for indoor maps and real-time position visualization
- REST APIs โ Position scanning and RSSI endpoints for integration with apps and scripts
- CAPsMAN integration โ Use MikroTik CAPsMAN for centralized AP management and RSSI data collection
- Jupyter notebooks โ Data gathering, KNN analysis, and experimentation workflows
- Django + PHP stack โ Web backend (Django) and RFID Indoor Positioning System frontend (PHP/MySQL)
Thesis2.0/
โโโ backend/ # Django project (web app + API integration)
โโโ frontend/ # PHP web frontend (RFID Indoor Positioning System)
โโโ notebooks/ # Jupyter notebooks (data gathering + KNN analysis)
โโโ algorithms/ # KNN algorithm implementations + training datasets
โโโ data_collection/ # WiFi RSSI & position scanning scripts (CAPsMAN-based)
โโโ data/ # Raw, processed, and final datasets
โโโ hardware/ # Arduino / ESP-IDF / drivers
โโโ api/ # REST endpoints and Django API glue code
โโโ docs/ # Documentation (e.g., dataset PDF)
โโโ archive/ # Old / experimental / backup copies
- WiFi RSSI data is acquired using MikroTik CAPsMAN:
- Centralized management of multiple CAPs (APs)
- Periodic scanning of RSSI values at different reference points
- Exported logs and CSVs processed into fingerprint datasets
- Related assets:
data_collection/wifi/โ users log trials, AP data, calibration CSVsdata_collection/position_scanner/โ position scanning scripts + captured RSSIdata/dataset/Data Gathering (Thesis 2)/โ curated datasets derived from CAPsMAN logs
- Data gathering notebooks
notebooks/data_gathering/Data Gathering Sample Size = 100.ipynbnotebooks/data_gathering/Data Gathering Sample Size = 200.ipynb
- KNN analysis / fingerprinting notebooks
notebooks/knn_analysis/(multiple iterations and final versions)- Datasets and intermediate CSVs:
notebooks/data/anddata/dataset/
- Machine learning artifacts:
- Trained models / joblib files (e.g.
MLKNN_1_classifier.joblib)
- Trained models / joblib files (e.g.
- KNN fingerprinting implementations in
algorithms/knn/:- Multiple versions (
KNN_Algorithm*.py) for experimentation - Training datasets (
trainingdataset/*.csv) - Aggregated prediction outputs and evaluation CSVs
- Multiple versions (
- Integrated KNN usage also appears inside the Django
myapp(e.g.KNN_Algorithm.py).
- Django backend (
backend/django_thesis/)- Handles web views, models, admin, and integration with KNN logic
- Uses both SQLite (development) and MySQL (production-style config)
- APIs
api/django_api/โ Django-based API integration (api.py)api/rest_api/โ standalone Python scripts for scanning endpoints:Position_Scanner_cap*.pyScanned_API_cap*.py
Prerequisites: Python 3.x, PHP 7.3+, MySQL 5.7+, and (optional) Jupyter for notebooks. For RSSI data collection, a MikroTik CAPsMAN setup is required.
-
Clone the repository
git clone https://github.com/reyden142/Thesis2.0.git cd Thesis2.0 -
Django backend
- Create and activate a virtual environment, then install Django and project dependencies.
- From
backend/django_thesis/:python manage.py migrate python manage.py runserver
- The app runs at
http://127.0.0.1:8000/(or the URL shown). Uses SQLite by default; configure MySQL insettings.pyif needed.
-
PHP frontend (RFID Indoor Positioning System)
- Use XAMPP, WAMP, or a similar stack with PHP and MySQL.
- Place the
frontend/rfid_ipsfiles in your web server document root (e.g.htdocs). - Import any provided SQL schemas (e.g.
rfid_ips.sql,ap_data.sql) into MySQL and configure DB credentials in the PHP app. - Access the frontend via your local URL (e.g.
http://localhost/rfid_ips/).
-
APIs and data collection
- Use the scripts in
api/rest_api/anddata_collection/position_scanner/to scan positions and consume RSSI/position endpoints. Ensure the Django server (and CAPsMAN, if used) are running where applicable.
- Use the scripts in
-
Notebooks and ML
- Open Jupyter from the project root or
notebooks/, then run the data gathering and KNN analysis notebooks as needed. Datasets live indata/dataset/andnotebooks/data/.
- Open Jupyter from the project root or
This project is licensed under the MIT License:
MIT License
Copyright (c) 2024 Reyden Jenn Cagata
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- Reyden Jenn Cagata - Initial work - reyden142
- Edwin Jr. Ligan - JMazeikeen
- Shen Wa Lai
- University of Mindanao - College of Engineering Education, Electronics Engineering
- Bootstrap team for the CSS framework
- jQuery team for the JavaScript library
- All contributors and users of this system
For support, email reydencagata@gmail.com or open an issue in the repository.
Thank you for your interest in SMART-TRACE. We hope this system contributes to safer, more efficient disaster management and indoor positioning research.