maandag 12 juli 2010

GPS logging as part of my self tracking setup

Here's a quick overview of the GPS logging part of my self tracking setup.

GPS logging
I'm using InstaMapper on my Android phone to track my position (every 30s).

Downloading GPS data
A few times a day, a shell script downloads the position data in CSV format using the InstaMapper API.
A typical CSV file looks like this:
2422576166695,Nexus One,1278915999,50.93014,3.63114,55.0,1.5,275
2422576166695,Nexus One,1278916059,50.93017,3.62980,52.0,1.7,274
2422576166695,Nexus One,1278916120,50.93022,3.62837,51.0,1.5,253
2422576166695,Nexus One,1278916181,50.93052,3.62713,58.0,1.8,285
2422576166695,Nexus One,1278916241,50.93049,3.62579,67.0,1.5,285
2422576166695,Nexus One,1278916301,50.93077,3.62449,54.0,1.2,260

Enriching GPS data
Every day, another shell script enriches that data by adding the names of known locations. It uses the Google Contacts API to fetch known locations and their addresses from my Google Contacts address book, and then uses Google Maps to convert those addresses to GPS coördinates.
The resulting CSV file will look like this:µ
Tue Jun 29 08:45:33 CEST 2010|51.03728,3.71103|11.96737|Gent-Sint-Pieters (126 m)
Tue Jun 29 08:46:34 CEST 2010|51.03696,3.71184|3.95215|Gent-Sint-Pieters (116 m)
Tue Jun 29 08:52:08 CEST 2010|51.03703,3.71191|.09921|Li De Clerck (145 m),Gent-Sint-Pieters (125 m)
Tue Jun 29 08:53:08 CEST 2010|51.03669,3.71167|2.48479|Gent-Sint-Pieters (86 m)
Tue Jun 29 08:54:09 CEST 2010|51.03671,3.71152|.63349|Gent-Sint-Pieters (80 m)

This setup is very up-to-date and dynamic, since it uses live data from the Google API's. As you can see, it adds the name of a location (such as "Gent-Sint-Pieters") or the name of a person (such as "Li De Clerck") whenever I'm within 100m from it.

I'm releasing all relevant scripts under GPL 3.0, feel free download and play with them !

Geen opmerkingen:

Een reactie plaatsen