How iPhone's GPS Works?

Most of us rely on our smartphones to get us where we're going. Whether it's to find a nearby deli, or to make sure you don't miss your stop on the subway, a phone can be a reliable tool when it comes to navigating unfamiliar territory. But how exactly does that GPS system work?

GPS is short for Global Positioning System and it relies on a series of satellites in space to figure out exactly where you are on the planet. GPS was originally designed by the U.S. Department of Defense as a navigation device for its own operations, but today anyone can use the technology for free. It's not just used by people either—it's also used in cars, trains, boats and airplanes.

Nowadays, most smartphones have built-in GPS systems that they use to pinpoint the user's location in a matter of seconds without requiring them to do an Internet search or plug into an external device like a car charger or external battery pack.

The way a smartphone is able to do this is through its connection with the global network of satellites that make up the GPS system. The satellites emit radio waves that your phone picks up and uses along with information about crowd-sourced Wi-Fi hotspots and cell towers near you to calculate the distance between you and the tower.

It's an eerily accurate little factoid of the iPhone that, even when you're not using it, it knows where you are. And how does it know where you are? It's because of a technology called triangulation. Triangulation is a fancy name for a simple concept: if you have two points, you can figure out where something is located exactly (even the most precise GPS system still uses the concept of triangulation to pinpoint your location).

The iPhone accomplishes this by measuring how long it takes for a signal to travel from your phone to two different cell towers. Think about how a triangle works: there are three points on the triangle (A, B, and C), and because you know the length of two sides (AB and AC), you can figure out what the third side is (BC).

Triangulation works in the same way: your phone sends signals out to nearby towers, and by measuring how long they take to reach those towers, your phone can determine its position within 100 meters.

It's actually a combination of the phone's GPS and its cell network, which allows it to triangulate your position by comparing how close each tower is to you.

The first thing that needs to happen is for your phone to figure out what time it is. If it can't do that accurately, it won't have a frame of reference for any other calculations. If your phone uses the Global Positioning System (GPS) for this, it's pretty straightforward: if you're in an area without cell service or Wi-Fi, the GPS will pinpoint your location on a map using satellites. 

However, if the phone uses the cell network for timing, there are a few extra steps involved. The cell towers talk to each other using a specialized protocol called Signaling System 7 (SS7). The network knows which towers are closest to you and can relay that information back to your phone; as long as your phone has good reception with them (or at least one of them), it can use those signals to calculate its distance from each tower and triangulate its position.

End