Skip to content

reyden142/SMART-TRACE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

169 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SMART-TRACE Thesis Workspace

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.

Python Jupyter PHP MySQL Bootstrap jQuery Leaflet MapTiler JavaScript HTML/CSS C++


๐Ÿ” High-Level Overview

  • ๐Ÿ“ก 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

โœจ Features

  • 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)

๐Ÿงฑ Project Structure (Simplified)

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

๐Ÿ“ก Data Collection & CAPsMAN (MikroTik)

  • 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 CSVs
    • data_collection/position_scanner/ โ€“ position scanning scripts + captured RSSI
    • data/dataset/Data Gathering (Thesis 2)/ โ€“ curated datasets derived from CAPsMAN logs

๐Ÿ““ Notebooks & Machine Learning

  • Data gathering notebooks
    • notebooks/data_gathering/Data Gathering Sample Size = 100.ipynb
    • notebooks/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/ and data/dataset/
  • Machine learning artifacts:
    • Trained models / joblib files (e.g. MLKNN_1_classifier.joblib)

๐Ÿงฎ Algorithms

  • KNN fingerprinting implementations in algorithms/knn/:
    • Multiple versions (KNN_Algorithm*.py) for experimentation
    • Training datasets (trainingdataset/*.csv)
    • Aggregated prediction outputs and evaluation CSVs
  • Integrated KNN usage also appears inside the Django myapp (e.g. KNN_Algorithm.py).

๐ŸŒ Backend & APIs

  • 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*.py
      • Scanned_API_cap*.py

๐Ÿš€ Getting Started

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.

  1. Clone the repository

    git clone https://github.com/reyden142/Thesis2.0.git
    cd Thesis2.0
  2. 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 in settings.py if needed.
  3. PHP frontend (RFID Indoor Positioning System)

    • Use XAMPP, WAMP, or a similar stack with PHP and MySQL.
    • Place the frontend/rfid_ips files 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/).
  4. APIs and data collection

    • Use the scripts in api/rest_api/ and data_collection/position_scanner/ to scan positions and consume RSSI/position endpoints. Ensure the Django server (and CAPsMAN, if used) are running where applicable.
  5. Notebooks and ML

    • Open Jupyter from the project root or notebooks/, then run the data gathering and KNN analysis notebooks as needed. Datasets live in data/dataset/ and notebooks/data/.

๐Ÿ“„ License

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.

๐Ÿ‘ฅ Authors

๐Ÿ™ Acknowledgments

  • 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

๐Ÿ“ž Support

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.

About

SMART-TRACE is a thesis-level project that implements a hybrid indoor positioning system using WiFi RSSI fingerprinting and RFID tracking. The goal is to enable accurate indoor location estimation where GPS fails (e.g., during indoor disaster response scenarios).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors