

-server compnent (written in PHP 5 and uses a MySQL DB as backend)

-Linux client (written in Python 2.7 and needs gpsd)



Some time ago I started to work on a GPS tracking system which allows me to store my taken paths with my mobile phone and allows me to easily access this data. All projects/products I found did not provide the things I wanted to have or I did not trust them.Soon after this I thought it would be great to have the possibility to do GPS tracking with a variety of devices and have a server-based structure. The server should evaluate the taken GPS data and the clients should simply gather the data and send it to the server (if a internet connection is available). Also this would allow me to track the position of the client in a kind of "real-time" fashion. I saw this kind of architecture in some companies which track their cars. But these products use SMS to send the position of the car to the server. Nowadays with mobile internet almost everywhere this methods seems obsolete.So when I wanted to tinker with a not security related topic, I worked on this project and now it is in a state to mention it.I created a github repository for it which contains all the code I have written so far (at least the code that is worthy publishing it). At the time of writing this, the repository contains the following:The structure is very simple. The server should do the work of evaluating the GPS data and get you an interface to easily access the data. The client has one purpose only: gather the GPS data and store it until it is transferred to the server.With this simple task it is easy to write a new client which works with the server (for example for Android or iOS). Also the client is not as bloated as other GPS tracking software which makes code reviews easier, for example to ensure that the GPS data is only transmitted to your server (did I mention that I did not trust a lot of projects?). The client transmits the data via a HTTPS POST request to the server and the server does the rest (which is storing the data in a database and providing an interface to get this data). The information the client has to transmit is: "latitude", "longitude", "altitude", "utctime" and "speed". This is everything the client does. So when you are interested, you can easily write a new client for the GPS tracking server and perhaps publish it to extend the variety of devices that can be used with the GPS tracking system.All this theoretical explanation of the GPS tracking system and how it works is boring. So here is an example for the GPS tracking system in action.I installed the Linux client of the GPS tracking system on a Raspberry Pi and put it into my car. With the help of an UMTS USB stick, the Rapsberry Pi has its internet connection and so I can track my car in a kind of "real-time" fashion. I used the cigarette lighter adapter to get the power for the Raspberry Pi. So every time the engine starts, the Raspberry Pi also gets started. But every time the engine is turned off, the Raspberry Pi loses its power supply. The problem with this is, that we do not know when the Raspberry Pi will lose its power (but this makes the problem also so interesting). So in order to avoid data loss, the GPS tracking Linux client will keep the data as near as possible to the filesystem. At the moment the Raspberry Pi is running in my car for about two months without any problems.Here is a screenshot of my browser while I am tracking my car in "real-time".It is not really "real-time". I used 10 seconds intervals in which the client will get the GPS data and transfer it to the server. Also the browser will only check every 10 seconds for a new position of the client. But this is sufficient enough to get a adequate "real-time" feeling.Do you know the TV shows in which the position of a suspect or an investigator is tracked on a map in real time? It is a funny feeling to have this technique at homeBut the "real-time" tracking does not stop there.You can also track the position of your car with your mobile phone. I can not tell you how practical it is when you again forgot where you parked your car. And one thing I also want to mention is, that I am the first person that will laugh out loud when his car is stolen(this to the subject of "not security related").As a final note, the Raspberry Pi (model B) does not provide enough power for an UMTS USB stick. I tinkered a little bit with the USB extension cable I used for the UMTS USB stick. So if someone is interested in how I did this, he can contact me and I will tell (or make a little tutorial on this topic).