Apple finally has officially responded to reports that iPhones store user location data in the form of an unusually revealing Q&A.

The company says it’s not actually tracking iPhone locations, instead it’s been compiling a crowdsourced database of cell tower and WiFi hotspot locations — “some of which may be located more than one hundred miles away from your iPhone,” Apple stresses — to speed up GPS services on the iPhones. Apple says it’s simply a bug that some users have found large amounts of this data on their computers — something that blogger John Gruber previously hinted at.

Apple scores points for finally offering a clear explanation of what’s going on, though much of the public outcry surrounding the scandal could have been avoided if it had cleared up the situation earlier. The iPhone location scandal has spurred quite a bit of public outcry, and it has also brought to light that other platforms like Android also collect a certain amount of location data.

So how exactly does the database of cell towers and hotspots help your iPhone’s GPS? Apple explains:

Calculating a phone’s location using just GPS satellite data can take up to several minutes. iPhone can reduce this time to just a few seconds by using Wi-Fi hotspot and cell tower data to quickly find GPS satellites, and even triangulate its location using just Wi-Fi hotspot and cell tower data when GPS is not available (such as indoors or in basements). These calculations are performed live on the iPhone using a crowd-sourced database of Wi-Fi hotspot and cell tower data that is generated by tens of millions of iPhones sending the geo-tagged locations of nearby Wi-Fi hotspots and cell towers in an anonymous and encrypted form to Apple.

The company says that it downloads “an appropriate subset (cache) onto each iPhone” of that crowdsourced database, which is “protected but not encrypted.” The backup of that cache is encrypted if you choose to encrypt your iPhone backups, but that won’t matter anymore as Apple says that it will discontinue backing up this cache in a software update.

Additionally, Apple says that an upcoming update will make sure the cache doesn’t store more than seven days worth of data (some people have seen data going back for a year), and that it will also make sure that your iPhone doesn’t use the crowdsourced cell tower database if you turn off location services.

The update fixing all of the above bugs will be coming in the next few weeks, and Apple says that the next major version of iOS will encrypt the crowdsourced cache on the iPhone.

One other interesting tidbit: Apple also says that it’s “now collecting anonymous traffic data to build a crowd-sourced traffic database with the goal of providing iPhone users an improved traffic service in the next couple of years.” I think that’s most likely referring to the traffic information feature currently available in the iPhone’s Google Maps app, and it seems like Apple is looking to somehow improve that experience.