Zonkod logo Zonkod
←
Technology

Simple on the surface. Deep underneath.

Zonkod is designed to be simple, fast, and universal. But there is a lot of technology behind it. Let’s dive in!

Zonkod technology overview

The Earth divided into exactly 10,000 surfaces of similar precision. A rough idea of how Zonkod works.

The inspiration

An old GPS device on a car dashboard at sunset
Fifteen minutes, no success. The problem was real.

Some years ago, while travelling, I tried to enter the geographic coordinates of a restaurant into the navigation system of a high-end car. Despite being an engineer with a PhD, I struggled for fifteen minutes without success.

At that moment, I understood there was a real, unsolved problem. Hopefully, I did manage to have dinner that evening ;)

The first idea: a geographic phone number

A rotary dial whose digits beam down to a place on Earth
Dial a place, like dialing a phone.

That was THE solution: a geographic phone number: easy to dial, universal, mastered by everyone on Earth.

Except that it is more than difficult to divide a sphere into exactly 100,000,000,000,000 identical surfaces. In fact, that is impossible.

The second idea: precision over perfection

A caliper measuring a small globe, pin at the measured point
The Earth, measured like a machine part.

Then came the second great idea: forget about identical surfaces and focus on what really matters: precision.

Take a location somewhere. Encode its position into a number, then decode that number back into a new location. The only thing that matters is that those two locations are not too far apart. The precision of the whole system is the maximum distance between them in the worst case. This is the one and only thing that matters!

It also had to be simple and recognisable at first glance, hence the single precision and the leading ZK:.

No trigonometry. No floating point. Ever.

A glowing integer grid with the ZK pin on an exact intersection
Exact by construction: the pin lands on an integer crossing.

Another constraint is the ease of encoding and decoding, and full reproducibility. Every system (from a tiny embedded IoT device to a mobile phone, a desktop computer, or a mainframe) must give the exact same result, always.

But computers have finite precision. For scientific and technical computing, they use what is called floating-point numbers. These are also mandatory when using trigonometry or other exotic functions. Unfortunately, there are many different systems, many languages, and many libraries, all with tiny differences between them. On top of that, floating-point systems are either slow, expensive, or both.

So: no trigonometry, no floating point, only integer arithmetic, because it is the one and only deterministic solution.

One standard. No VHS vs Betamax.

It took a long time to design such a system, but it eventually succeeded. The result, available today, is Zonkod. A patent is pending for this technology. One of its key goals is to establish a standard by ensuring there is only a single ZK:, with no more format wars.

Near-perfect precision

We can calculate the best theoretical precision possible for a given number length. For 14 digits, it is 1.5969 m. The Zonkod encoding is nearly perfect: its precision is 1.5988 m, or 99.9% of the optimum. Everywhere. This matters because it maximises the usefulness of every digit.

1.5988 m
actual precision
1.5969 m
theoretical optimum
99.9%
of optimum

Verified across platforms

Devices from phone to retro computer sharing the same ZK pin
Same result on every machine, down to the last digit.

Zonkod has been implemented in many different languages, including C, JavaScript, WASM, FORTRAN and Python. They all give the exact same results, down to the last digit.

It has even been ported to COBOL, a language designed in 1959 for business accounting, which was never meant to handle geodesic computations. And yet, it works. If Zonkod runs in COBOL, it runs anywhere.

Tiny, fast, everywhere

Arduino Nano running Zonkod
A tiny Arduino Nano running Zonkod

Speed and compactness also matter.

On an Arduino Nano (8-bit ATmega328P, 16 MHz), a bare-metal complete encode+decode program (including I/O and a PRNG) takes 11,956 bytes of ROM and 192 bytes of RAM.

It achieves a full round-trip in 1.48 ms on average. On a mobile phone or a desktop, we are down to nanoseconds.

The bottom line

Zonkod turns a hard geometric problem into a simple integer operation. The result is a location code that is compact enough for an 8-bit microcontroller, fast enough to run on every system, precise enough for everyday use, and identical on every device on Earth. One number, one standard, one ZK:.