# Localization in Low Power Wide Area Networks Using Wi-Fi Fingerprints
## 2 Methods and Materials
### Wi-Fi Databases
Twelve locations have an error greater than 2 km, which is clipped in Figure 2:2

The average probability of finding neither BSSIDs in the LocationAPI database, nor in the WiGLE database, of a combination of WAP seen at one of the 36 locations is 1.9%. This is calculated as in Equation (2). A graph of the probability of finding neither BSSIDs in the combination of databases is shown in Figure 2:3

When only sending the combination of BSSIDs with the highest RSSI values to the combination of databases, the mean error of all measurement locations decreases from 24.17 km to only 125 m. The median error decreases slightly from 40 m to 39 m. Using this method, a location could be estimated at all 36 test locations. Figure 7 shows the distribution of the error. ## 4 Discussion

The WiGLE and LocationAPI Wi-Fi fingerprint databases both contain a lot of entries, worldwide as well as in Belgium. However, the results of the databases differ from each other at some locations. ### Comparison of Databases

When considering the median errors, the LocationAPI results are usually better than the ones of WiGLE. At only four of the 36 measurement locations, the requests to WiGLE yield a smaller median location error, see Figure 2:4 The mean distance errors are in the range of 15 m to 546 km. This variety of mean errors is, as mentioned in the results, due to outliers in the location estimates. Figure 2:5 Overview of the location error on all 36 locations using the combination of the two databases by first choosing LocationAPI and then WiGLE. Errors larger than 2 km are clipped. Figure 2:6 Overview of the location error on all 36 locations using the combination of the two databases by averaging. Errors larger than 2 km are clipped. The probability that a BSSID combination is sent that contains two BSSIDs that result in no match is for both databases around 13%. However, there are large differences in this probability at specific locations, see Figure 2:7 This is how the combination of the two databases reduces the probability to 1.9%. ### Reasons for Flaws in the Results

When looking at the size of the location errors, we observe that a large error often occurs because a single BSSID leads to a wrong latitude and longitude pair. This causes a large error in every combination which contains that BSSID. When not considering that single 'failed BSSID', the errors will remain quite small and the distance error would decrease. Therefore, we always calculate the median location error, which is more resistant to such outliers. There will definitely be a fault during the transformation of some BSSIDs to coordinates. Therefore, when localizing a device using Wi-Fi and the WiGLE or LocationAPI database, one should keep in mind that there could be a 'corrupt' BSSID in the databases. When requesting a BSSID, the servers might respond with a wrong coordinate of the wireless access point. The distance between the GPS coordinate and the mean coordinate can vary from a few meters to over several thousands of kilometers. Of course, this influenced the mean error of every measurement where such a flaw occurred. For example, at location 1, when using the LocationAPI database, the errors of on ore more BSSIDs show a large deviation. Only 5% of all combinations result in an error that is equal to 8543 km. The coordinates that are returned are located in Brazil. The remaining 95% of the errors are always below 44 m. Therefore, the median error is only 23 m, while the mean error is 546 km. This outlier problem is much less apparent when selecting the two BSSIDs with the highest RSSI. The error at location 1 is then 3.7 m. Location 29, however, still has an error of 2.01 km. Overall, as shown in Figure 7, the mean location error in the WiGLE database is 103 m, the median location error is 66 m, and no location estimate can be found at 4 test locations. In the LocationAPI database, the mean location error is 114 m, the median location error is 33 m, and no location estimate can be found at 7 test locations.