📜 ⬆️ ⬇️

Geolocation without GPS (part 1)

wifi
I present the public base of geolocation of telephone towers and Wi-Fi routers. I needed a stable and unlimited base for the Android application, which needed accurate geolocation from all available sources (GPS, Wi-Fi, Mobile). I had to create a database of cellular towers and Wi-Fi. All interested in asking under the cat.

Brief description of the application:
  1. Stage 1. Every few minutes, the application launches the collection of information that is “visible” to the mobile phone (GPS, Mobile towers, all visible Wi-Fi) and saves to the local database;
  2. Step 2. The phone is synchronized once every half hour with the remote server and reports its location for each entry from the local database. Each time, the phone finds out “where is it?” By sending data about mobile towers and Wi-Fi to the API server.

Location Algorithm:

The most interesting thing is getting coordinates via Wi-Fi and Cell ID (Mobile Station ID).

Unfortunately, I have not found a single public extensive and relevant database that would provide an API without keys and limits on the number of requests. I had to create my base. More precisely two - for Wi-Fi and mobile towers.

Determining the location of Wi-Fi ( original article ).
')
Here I will present the main calculations. No keys are needed to use the API; there are no restrictions on the number of requests: https://api.mylnikov.org/geolocation/wifi?v=1.1&bssid= {wifi bssid}
{wifi bssid} - Bssid access points (MAC address of the access point network card).

The accuracy of the stored coordinates is about 155 meters. The number of entries is about 10.3M +. The base is constantly updated and supplemented, but I will be grateful if someone offers an additional open base.

Determining the location of the mobile operator's mobile station ( original article ).

I will also present the calculations: https://api.mylnikov.org/geolocation/cell?v=1.1&mcc= {mcc} & mnc = {mnc} & cellid = {cellid} & lac = {lac}

The accuracy of the data is about 1100-1600 meters. In the base of 10M + towers. The average recording age is 4 weeks.

The API script is written in Python, the database is MySQL.

I hope someone this database will be useful and someone will be able to use this database as a service.

Freedom of information!

UPD. The API response had a grammatical error in the word latitude. in the abbreviation, this field turned out to be “lan”. Thanks for pointing out the error. Currently showing two fields for backward compatibility. Community, what is better to do in this case? A new method with the correct field, or in return two identical fields to return? Many thanks for pointing out my shortcomings!

Source: https://habr.com/ru/post/256321/


All Articles