Saturday 1 March 2008

Meeting, Large errors in GPS readings

Meeting with Dr. Hyowon Lee 21st Feb

Had a meeting Hoywon about few ideas on how to implement the UI. Few good ideas, need to think about it further. I borrowed Envisioning Information book and skimmed it.

I also ordered Visualizing Data the same day, but it has not arrived yet... Hopefully Book Depository don't loose the book as they did for the previous book I ordered from them

The filesystem on Nokia device got corrupted(presumably when it ran out of battery), it would not boot properly. Luckily, this was on the MMC card and I could still boot the OS from the onboard flash and could run fsck(file system check) which showed up some corrupted/lost files, but luckily everything so far seems to work fine.

GPS Extraction

Didn't get much work done over the week and was away in Co. Clare over the last weekend, so spent all of today trying to figure out how to try to approach location extraction from the GPS logs.
After dusting off my SQL/PLSQL skills, I figured out how to calculate distance between 2 points taking account Earth' surface, using postgresql library, earthdistance. Took me ages to figure out why the results showed a large error from the one calculated by GpsVisualiser Calculator. I'm not to sure what I did in the end, but changing the lattitude/longitude type from 'REAL' to 'DOUBLE PRECISION' seemed to fix it.

With this, and more PL/SQL hacking, I came up with something which showed me distance between 2 points, and the rate of change with respect to time:



This shows my from the M1 motorway to Bank of Ireland, where I needed to wait for a while for the bank to open at 10am.
The fields are:
  • Latitude, Longitude of 1st coordinate
  • Latitude, Longitude of the following coordinate
  • Average number of satellites detected between the 2 readings
  • Average speed between the 2 readings
  • Date and time of the 1st reading
  • Distance between the 2 points with respect to Earth in meters
  • Time in seconds between when the 2 readings where taken
  • Rate of change, in Meters per second
The readings are fine, the rate of change is fairly large when driving on the motorway, around 30m/s, the speed that GPS is reporting is fairly accurate then. Towards the end, its possible to see that I have stopped moving and the coordinates are within 10 meters of each other(with few exception) and rate of change is very small. Everything is fine.... until you look further:


  1. I seem to be to have parked my car in one of the estates close by to DCU.
  2. Then walked to middle of DCU
  3. Within few seconds, I seem to end up 14km somewhere in the southside!
  4. Within 3 minutes, someone teleports me on M50 near Whitechurch
  5. Within 10 minutes, I end up somewhere in Kildare.
  6. Then somewhere besides M50 besides Finglas(the last coordinate on the screenshot)
  7. After this, somewhere in the Irish sea.
  8. Then in DCU sometime before 11.
Before today I was unable to see how randomly the GPS coordinates jump when there is no coverage(when in the building), mainly because having to scroll throw hundreds of coordinates and not knowing what to look for/hard to see.
I hope most of the time, the GPS just gives the last known coordinate - i.e the one before the building was entered... Is what I understood from my previous testing.

I have to come up with a way to filter these erroneous coordinates out! and also try to see how can I use rate of change to detect location entering/leaving.

Will update further.

Update 1st March: Forgot to mention that the way I'll schedule the the location extraction is by having a special table which gets updated of what data got transferred from the Nokia tablet when the data is transferred, and that table will have a trigger to run execute a Python function which will do all the work. And then expose this data with some sort of SOAP/XML interface that the UI will be able to query and present.

No comments: