T.A.P.P.S.

Trilateral Access Point Positioning System

We are living in a new world. A world where public thought must focus on healthcare and we all must follow the protocols set by health professionals. Unfortunately, not all members of society have been stringent in following these protocols. How are we doing as a campus community? Can we do better? How can we monitor social distancing in today's society? Can cellphones be used to locate you and your proximity to others?

Problem Statement

covid

What is Tapps?

TAPPS physically is an interconnected series of Raspberry Pi 3B+s. Three to be exact. Each with a secondary WiFi connection that can be placed into a "Monitoring" mode. Utilizing the primary,built in, WiFi these devices are connected to a designated control device amongst the three.
In the area of software used we have a few different languages being used between database, functionality , server, and the front-end UI. Overall, it is a NodeJS web application with control of a Linux host.

Initial Concept

A series of 3 scanning devices( Alpha, Bravo, Charlie) with established GPS connections reporting WiFi signal strengths to a main collection device ( Bravo). This collection device will store these variables in a MySQL database and then use widely known trilateration algorithms to determine the approximate position of a found device in the scan area. This position as well as those of the connected devices will then be displayed on a map for viewing and updated in real-time.

Concept - Adjusted

Adjusting placement to more standardized setup. A series of 3 scanning devices( Alpha, Bravo, Charlie)  reporting WiFi signal strengths to a main collection device ( Bravo). This collection device will store these variables in a MySQL database.This information will then will be applied to a partially rendered JavaScript drawing to complete a visual identification of the FOUND device. Then, I will  use widely known trilateration algorithms to determine the approximate position of a found device in the scan area from 3 predetermined points.

Reference Links

Distance Algorithm

Solving for d, we have
return Math.pow(10.0d, (27.55d - 40d * Math.log10(freq) + 6.7d - rssi) / 20.0d);
A java implementation would be as such
Wikipedia defines free-space path loss as:
This is for distance d in km and frequency f in GHz. We want to measure distance in m and frequency in MHz, so the formula becomes
previous arrow
next arrow
Slider

Trilateration Algorithm

A 2D model of the problem based on (x,y) coordinates (as an alternative to longitude/latitude coordinates).
The three equations for the three circles are above
We can expand out the squares in each of these three equations
Now we subtract the second equation from the first
Likewise, we can now subtract the third equation from the second
We can rewrite these two equations using A, B, C, D, E, F values. This would result in the following system of 2 equation
The solution of this system is
previous arrow
next arrow
Slider

Tech

Each Pi serves up a NodeJs server. The servers on Alpha and Charlie act as an API gateway to control the attached Wireless Adapter as well as the remote Linux system itself. These devices run scripts on startup to reset,reconnect and initialize their servers. They are connected to a WPA2 secured network via Bravo on their internal stock wireless adapters.

The server on Bravo is more robust in that it acts as the command and control module for the three and serves the UI up to me.

Tapps Diagram

Hardware

  • pi_logo

    Servers

    Raspberry Pi 3B+

  • ALFA_LOGO

    Scanning Devices

    Alfa AWUS036NH

Slider
Slider

Software

It’s not a bug – it’s an undocumented feature.

Challenges

Implementation

One of the first major issues I faced was that of this network of devices not functioning properly due to their inability to track GPS indoors with my budget ( and Bowman Hall is a lot of concrete). This was after the initial build.

Back Ups

The second crisis was that of my own error before and after erroneous file deletion. In trying to advance my Linux usage skills I ran a command that would delete all files except ones I explicitly stated. It worked GREAT!... Except I had stepped up one directory and deleted my entire project. This was an upsetting mistake without excuse as I know how to utilize GitHub.

SQL

The third formidable task came when I was having a difficult time isolating the three needed RSSI (signal strength) measurements. I was on the right track and knew what I was doing enough to reach out to my peers on Stack Overflow. I was able to provide enough info and show confidence in my knowledge that I was rewarded with an assistive answer.

Rendering

The final hurdle was that in my rendering of the final collected and processed data. I was able to find success in visually seeing an overlapping scan early on. This happens through the overlaying circles(scans) of the JavaScript <canvas> element. This in an internal function that I was not attempting to decipher. That is what I found and worked on understanding the second algorithm for, right? Well, my algorithm is implemented wrong somehow in that I cannot render what I see as correct Client X,Y coordinates for tracking. There is fluctuation between found clients X,Y coordinates however the placement is wrong I find in my visual comparison.

Project Update Videos

Demonstration

Reflection Area

frost

Things I'd Correct

Not all the functionality got implemented. The project exists as functional however adjustments must be made for accuracy and consistent reporting

Solutions

  1. Acquire 3rd wireless adapter equal to counter parts
  2. Do more scientific testing to compare measurements
  3. Adjust the two algorithms to function with proper data
  4. Utilize my 3d printer for mock tactical casings and designs

Where it is Heading

Beyond basic functionality there are many areas of this project I'd like to finish in my own time

It Will

  1. Be powered by multiple sources i.e. Solar and 18650 Rechargeable Batteries
  2. Allow more specification from the UI & incorporate an Interface for other pieces of software such as NMAP and TraceRoute
  3. Minimize the Linux OS to only whats needed as to reduce stress on devices

Push it to the limit

Oh the places you will go

  1. Incorporate cellular connection and restructure to store data in the cloud.
  2. Become mounted on a quad copter