# LoRa-Geolocation : This idea is to create a GPS-Free Geo-location tool by implementing Low-Power LoRaWAN technology. Using our tool, we will be able to track anything inside a perimeter without the use of GPS, GSM or any other international geo-location services. Our tool uses a multi-lateration algorithm with LoRaWAN to calculate the location by measuring the timestamps, (TDOA) and the signal strength (RSSI) of the captured packages. The tool consists of an end-node,four gateways, a server and an application to store the obtained data in a database. If implemented, this tool could be used in surveillance, crowd control and in occupancy reduction, which is critical in the time of a crisis, especially in a pandemic. Our tool could be built over the infrastructure which is already in place in Thiruvananthapuram could be easily deployed state-wide. With the datasets collected, we could potentially gain insight into the places of interest and other metrics like the average crowd movement, which could be of use to the law enforcement in future endeavors. # System Design : ### A. End-Node The end node has to be some sort of development board interfaced with a supported LoRa module. Specific development boards with built in LoRa modules are also available. In our scenario it should be supported by the TTN so that we can register and use it without any compatibility issues. The list of choices is pretty big and diverse in terms of functionalities, thanks to the open source Hardware community. ### B. Gateways Gateways form the bridge between devices and The Things Network. Devices use low power networks like LoRaWAN to connect to the Gateway, while the Gateway uses high bandwidth networks like WiFi, Ethernet or Cellular to connect to The Things Network. Gateways are routers equipped with a LoRa concentrator, allowing them to receive LoRa packets. ### C. Server Non-IP protocols such as LoRaWAN require some form of routing and processing before messages can be delivered to an application. The Things Network is positioned between the gateways and the applications and takes care of these routing and processing steps. ### D. Application The application server back end receives the values from the TTN server and stores it in a database. The data can then be fed into the algorithms for final processing and getting output. We plan to use some sort of MapAPI preferably an open source one. The choices that we have at our disposal are Google Maps API and OpenStreet Maps API. # Multilateration In Figures : ![Locus of the node (TDOA bsed Multilateration) ](locus.png) ![The Loci for 4 gateway system](loci.png) # Trilateration in Figures : ![RSSI based Trilateration](trilat.png) #### The detailed math to the algorithms is available in the doc. https://docs.google.com/document/d/1xZMsa_6JVZ_qkZlDcbROOjiNUiVgjTkF5A4c-jtn3Qs/edit?usp=sharing # Proposal In the first phase of our project we propose to implement TDOA with Multilateration for outdoors and RSSI with a Path Loss Model followed by Trilateration for indoors. In this phase we intend to achieve accuracies of within 100 mtrs outdoors and 81% indoors through the proposed models. Apart from implementing these algorithms we also intend to integrate this with currently available Map APIs. The infrastructure costs only include setting up the nodes and gateways as the Network Servers are already freely available from the The Things Network in collaboration with ICFOSS, Kerala. # Future Work If given a chance we look forward to expanding this project by implementing other advanced ML models through techniques such as fingerprinting for RSSI-distance mapping which are currently out of time, scope and resource constraints. Note : Making these ML models need rigorous training over huge amounts of data which need resources such as time and processing power(currently unavailable). Implementing these models can help us achieve higher accuracies as much as 91.92%(indoors) and 85% (outdoors) making this a full fledged go to LoRa based geolocation tool for any kind of scenario. This would enhance perimeter security in a big way as it would help monitor environments way more efficiently and independent from international geolocation tools. ## Manual Compute location with generated time data: ``` $ python3 test_geolocation_engine.py -c ``` Compute location with real time data: ``` $ python3 run_geolocation_engine.py -d example_data/database_b.db -e 00250C0020018C26 ``` Compute locations with real time data and view locations on a map: ``` $ python3 python start_server.py -b -d example_data/database_s -p 8001 ``` ![Demo Screenshot](webapp_demo.png)