Sunday 25 November 2007

Progress so far

The beginning

I bought a Nokia 770 Internet Tablet back in August, for slightly over 100 euro, with the view of using it for a final year project. Its a little small cool gadget which runs Linux on it, thats all it matters :).


What the project aims to do:

To see how accurate the automatic day summary can be using GPS data and Bluetooth detected devices. The user basically gets prompted of what happened where he/she can extend it or leave it as it is. The logging is to be done on Nokia 770 with a Bluetooth GPS device.

Summary what happened so far:
  • 5th Oct 07: Meeting with Cathal Gurrin, Daragh Byrne about logging GPS data and bluetooth environment on Nokia 770.
  • 6th Oct - 13th Oct 07: Away. Tried to read some papers Daragh has linked to but did not really work out.
  • 15th Oct 07: Meeting with Alan Smeaton, agreeing to supervise me. Had few meetings with other people (Stephen Blott, Mark Roantree, Gareth Jones) about few other ideas over the week.
  • 19th Oct 07: Submitting project proposal
  • 6th November 07

    Bluetooth GPS(Navicore Slim SiRF III, from ebay) device finally arrives taking 2 weeks!
    It turns out that it is fairly easy to read the data off it, opening a serial connection over Bluetooth just reveals bunch of fairly cryptic data in a format called NMEA 183.



    Some messing around with gpsd, led nowhere as the version shipped with the device has a bus error - I had to cross compile a new version on scratchbox my self, but that led to some other problems as gpsd attempts to reconfigure the device to get the optimal performance, which basically temporarily bricks the device until it runs out of battery as printing out what it sends becomes unreadable gibberish - not NMEA strings but some binary data. Cross compiled the svn version of gpsd which has the -b option to turn it off except that did not help it... Decided it is just quicker to write my own simple Python class to parse the NMEA 183 strings that I'm interested in (GGA and RMC). It needs some slight cleanup, for example like checking the checksum of the string received.
  • 23rd November 07: Meeting with Alan Smeaton, scanning over very basic functional spec, discussing few ideas.

Yesterday with a bit of playing around I got the data to be stored to SQLite database instead of a plain text file. But things aren't always simple and there are little things that slow you down, the data that I added to the database was not being written to the database file after the program executed - even after closing the connection, it turns out I need to use .commit() on the connection object... and a simple 1 line fix took 30 - 60 min to fix! Example output data:

22:19:57,2007-11-25,53.6XXXX,-6.2XXXX,03,0.0#[('0016DBAXXXXX', 'SGH-S400i'), ('00137009XXXX', 'Nokia 6021'), ('001B5953XXXX', 'K800i')]

The fields are, Time, Date, Latitude, Longitude, Satellites Detected, Speed.
The hash symbol separates GPS data from the Bluetooth environment, which is a list of tuples. The last few letters have been removed from the MAC addresses from the bluetooth devices and the last 4 GPS coordinates.

What I need to do next is transfer this data to a more powerful machine automatically. What I have decided is best thing to do is transfer it to my laptop. When I'm at home, the laptop gets the same IP address from my home router every time. So all I need to do is have a thread which checks every once in a while is it possible to connect to my laptops IP address at home, if so it can transfer all the data it has to the PostgreSQL server on my laptop. This is the most easiest place I can transfer the logs automatically.

Then/In the process I need to read more papers about Location Segmentation and take a look at few existing clustering algorithms like the K-Means and start implementing and test one.

Thats it for now. Busy week awaiting for me(finishing functional spec for Friday, Patterns project due on next Monday).

No comments: