Geolocation
Jump to navigation
Jump to search
✎ This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.
Geolocation means locating you geographically, based on something.
In this mobile-device world, this is mostly about a server or app asking the client (probably phone) to do this itself,
and probably tell the server.
...except for the IP address geolocation case, which is done by the server. A server needs:
- an IP address -- which it will necessarily know, it's the place where the reponse needs to go
- someone to have put a lot of work into "this range of IPs is probably here" - and there are companies that do.
For the API in browsers, see Javascript_notes_-_browser_related,_APIs#Geolocation_API
Methods and accuracy
The methods this might be backed by include:
- GPS receiver (mobile mostly - other devices tend not to have one)
- in cities, expect at most ~5m in a relatively open area, at most 10m with trees and tall buildings around, and basically nothing indoor (may fall back to any of the below)
- tends to update no faster than once per second
- WiFi based positioning
- (based on seeing known Wifi hotspots that were previously detected by devices that also did have their GPS on at the time) [1] - which puts these APs in roughly the right place
- assume you won't often get better than 20m accuracy - and assume you get little to no coverage unless you're in a city near a house
- though indoor it sometimes may be down to ~5m if your specific AP happens to be submitted
- assume you won't often get better than 20m accuracy - and assume you get little to no coverage unless you're in a city near a house
- cell tower mapping (mobile only)
- same "as previously seen when you had GPS on" idea as just described with WiFi, but using cell phone towers
- ...which cover a much larger area, tends to be worse
- that is, a single tower may only know you are within its radius, and roughly in which direction (they seem to have three antennas covering ~ 120 degrees each). So it may not get much better than 1km precision.
- note that phones may register with two or three towers, though just talk to one
- In theory, a network that wants to track its users can triangulate, but this seems to not often be in place
- IP geolocation
- primarily for devices that are broadband users - fixed, or on wifi - because of how the publicly visible address are given out to them.
- ...on mobile networks you do get addresses but they change frequently and relate little to location)
- assume you
- usually won't get better than 1km
- sometimes a bit better
- sometimes a lot worse
- both better and worse relate to how addresses are assigned and divided. Which itself is sometimes very predictable, frequently much less so, so you can
- likely place someone in the right country
- regularly in the right state/province
- sometimes within dozens of km (so within a city or two), and
- occasionally down to a university campus or such (1km, but only because universities often got a large fixed subnet, and someone will submit that to the lookup database)
- the funny thing is that even if the location is more accurate, you usually don't know that it is. Lookups will only sometimes estimate the precision, and only sometimes estimate it well. So maybe it's better than 100m, maybe it's as bad as 100km.
- defeated by VPN
- primarily for devices that are broadband users - fixed, or on wifi - because of how the publicly visible address are given out to them.