Driving down the road and GPS works on iPod?

Solution 1:

I'm guessing, since I couldn't find any confirmation, but the iPods use the Skyhook network, which is basically a big database of wifi access points and their approximate location. Since you wouldn't have been connected to a network, (here's the guess) the geolocation service must've cached some amount of the database for your general area.

Solution 2:

I don't think you have to have a WiFi connection for it to triangulate off of WiFi signals. As long as you have WiFi turned on, the iPod can see the WiFi networks within range. It doesn't have to be connected to any of them.

note: the following is mostly speculation

The iPod has a WiFi receiver in it that's on all the time (unless you purposely turn it off). The receiver is constantly listening for WiFi signals. If you open your Settings and look at WiFi you'll see a list of WiFi access points that are within range. Your iPod might not be connected to any of them but it knows their name (more importantly the unique SSID) and it knows how strong the signal is.

The iPod also stores a database of the locations of known SSIDs. Then it does some fancy calculations. So, if it knows that SSID A's signal is stronger than SSID B's signal it assumes you're closer to A. With enough signals around you, it can make a pretty good approximation of your location.

Even moving quickly, it can sense changes in signal strength as you move and recalculate your position. In a town/city you'll likely have a lot of known signals. Try driving out on a remote highway. You'll likely lose any position information.