I just downloaded this application and checked out my iPhone.
Unless I’ve been doing a lot of sleep-driving, the resulting map has me being in a lot of places where I’ve never been - and not just a few miles off, I’m talking about 100+ miles away!
It shows you were places you never really were! Ruh-Oh! How many divorces will this cause?
There are two tables: one for WiFi access points, and one for cell phone towers.
Your iPhone is simply keeping a cache of transmitters that it "hears". Each time it hears a new one, it queries an online database and gets the location. It stores this data, so that it can be used again without making another query to the online database.
The iPhone has "assisted GPS", which means that it uses the known locations of WiFi access points and cell towers to approximate your position, then uses GPS to refine it. Using this method, it can determine your position much faster, anytime you use an iPhone application that utilizes "location services".
Yes, the Wifi data can be used to approximately determine your position within a city block, after the fact. But, it's not logging the location of YOUR phone -- it's remembering the locations of fixed points that were used to help determine your location.
The cell phone tower data is much less precise. I've seen it report a location miles away from the closest place I've been (driving on a major interstate highway through the area).