As it was revealed that Apple has recorded your moves, I processed that data and found it is even better than GPS data that I have been collecting using GPS MotionX App in a sense that it has never been turned off when the location service is on :).
I followed instructions at http://petewarden.github.com/iPhoneTracker/ and http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup. Let me first show you my records :)
One thing looks weired is the tracks around Rome where I have never been to. I will dig into timestamps later when my iPhone was there or it is just error.
And here we go the instruction for your own iPhone tracks.
- This instruction is limited to Mac users who have synched their iphone with their Mac book.
- If you have updated your iPhone OS to 3.1.3, which is the update to delete these caches, your Mac may not have it. But you may give it a try.
Here are more simple step-by-step steps to follow:
1. Download the attached iphonels.py_.txt (See http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup for details on this code). We will assume that this file is located at ~/Downloads
2. Rename it to iphonels.py:
mv iphonels.py_.txt iphonels.py
3. Make it executable:
chmod u+rwx iphonels.py
4. Open "Terminal" and
cd /Users/your_user_name/Library/Application Support/MobileSync/Backup
5. There you will see Hash coded directories. The number of directories depends on the number of times you backed up your iphone. This means that at each directory you GPS backup files exists. So visit "cd" into all directories and run:
~/Downloads/iphonels.py | grep "consolidated"
6. You will see something like:
-rw-r--r-- 00000000 00000000 14213120 1305796160 1305796160 1290082216 (4096c9ec676f2847dc283405900e284a7c815836)RootDomain::Library/Caches/locationd/consolidated.db
7. That text in brackets just before 'RootDomain::' is the name of the actual SQLite file on disk that holds the location data.
8. With the above example at Step 7, let's copy it to your Documents:
cp 4096c9ec676f2847dc283405900e284a7c815836 ~/Documents/iphone_gps_cache_1.sql3
10. Iterate to all subdirectories under /Users/your_user_name/Library/Application Support/MobileSync/Backup and run Step 10. Change the target file name to save (ex iphone_gps_cache_2, 3, 4, .. ,.sql3)
11. Ok. Now you have iphone_gps_cache_(?).sql3 files. To see the inside, download SQLite Database browser for mac and open each sql3 file.
12. The table "CellLocation" includes all data. There the timestamp shows the time in seconds since January 1st 2001. So it needs further manipulation to get the corrent time.
13. We use MySQL, not SQLite3. So let's export data from here and put into MySQL. Select File -> Export -> Export to sql file. You have to repeat this for all sql3 files you have.
15. Now run below statement to see the time ranges of your data. It might have recorded GPS since your first iPhone time.
SELECT MIN(Timestamp) AS start_unixtimestamp, MAX(Timestamp) AS end_unixtimestamp, DATE_ADD(FROM_UNIXTIME(MIN(Timestamp)), INTERVAL 31 YEAR) AS start_datetime, DATE_ADD(FROM_UNIXTIME(MAX(Timestamp)), INTERVAL 31 YEAR) AS end_datetime FROM CellLocation;
I have not analyzed in detail. Soon I will push it to your database :)