Maidenhead grid squares
The Maidenhead Locator System, also called the QTH locator, packs a global
position into a short code such as IO91WM. Amateur radio operators use it to
exchange locations compactly and to compute distances between stations. Each
pair of characters refines the position: the first pair selects a large field,
the second a square within it, the third a subsquare, and the fourth an extended
square.
How it works
The grid divides the world from the south pole and the antimeridian. The first character pair (letters A to R) splits longitude into 18 bands of 20 degrees and latitude into 18 bands of 10 degrees. The second pair (digits 0 to 9) divides each band into ten, giving 2 degrees of longitude and 1 degree of latitude. The third pair (letters A to X) divides by 24, and the fourth pair (digits 0 to 9) divides by another ten.
IO91WM -> field IO + square 91 + subsquare WM
Adding the running offsets and returning the center of the final cell yields the latitude and longitude.
Example and tips
The locator IO91WM resolves to roughly 51.46 N, 0.21 W near London. Longer
locators are more precise, so prefer a 6 or 8 character grid when accuracy
matters. Because a locator names an area, two nearby points can share the same
short code, which is expected behaviour rather than an error.