A GPS receiver uses satellites to pinpoint locations. See more pictures of essential gadgets.

Our ancestors had to go to pretty extreme measures to keep from getting lost. They erected monumental landmarks, laboriously drafted detailed maps and learned to read the stars in the night sky.

Things are much, much easier today. For less than \$100, you can get a pocket-sized gadget that will tell you exactly where you are on Earth at any moment. As long as you have a GPS receiver and a clear view of the sky, you'll never be lost again.

In this article, we'll find out how these handy guides pull off this amazing trick. As we'll see, the Global Positioning System is vast, expensive and involves a lot of technical ingenuity, but the fundamental concepts at work are quite simple and intuitive.

­When people talk about "a GPS," they usually mean a GPS receiver. The Global Positioning System (GPS) is actually a constellation of 27 Earth-orbiting satellites (24 in operation and three extras in case one fails). The U.S. military developed and implemented this satellite network as a military navigation system, but soon opened it up to everybody else.

Each of these 3,000- to 4,000-pound solar-powered satellites circles the globe at about 12,000 miles (19,300 km), making two complete rotations every day. The orbits are arranged so that at any time, anywhere on Earth, there are at least four satellites "visible" in the sky.

A GPS receiver's job is to locate four or more of these satellites, figure out the distanc­e to each, and use this information to deduce its own location. This operation is based on a simple mathematical principle called trilateration. Trilateration in three-dimensional space can be a little tricky, so we'll start with an explanation of simple two-dimensional trilateration.