Monday, 3 March 2008

More on GPS extraction

Spent all of today trying to mess around with a way to get rid of the errors in the GPS recordings when inside. This lead me to trying to read up on some neural nets but I left that idea as it would be a lot nicer if the functionally which extracts locations would be inside the database... it would take care of solving when to try to run that data(or i could just schedule it once a day if it goes that way).

Was messing around with PL/Python which allows me to write python code in PL/SQL... but it soon got messy(trying to access all the result columns and naming) and I checked out PL/PGSQL, which is basically Oracle' PL/SQL for postgres. But not really familiar with it, so I kept on making stupid mistakes... you cant name/alias results from a table as 'a'(it works fine in an SQL statement, but not in PL/PGSQL) - took me probably nearly an hour to chase down.
Didn't made much progress on this today and yesterday... I got another full planned day on trying to figure this out on Wednesday.

It turns out that the Visualizing Data book order was canceled because they could not fulfill the order at the current time... So I ordered it from amazon.

RSSI

Spent some of yesterday looking at RSSI for bluetooth devices, but didn't feel to great and got distracted to easy.
What I managed to get done is to display values using the example in pybluez. but I'm not to sure it works correctly:
  • The values where high -30 for all the devices, no matter what the distance.
    I can't understand the code, it seems to just to listen for the RSSI event somewhere inside the bluez internals, and format it somehow with the ba2str function... my guess it means bluetooth address to string.
  • I looked at the code of previously mentioned BlueProximity and it has a comment about pretty much exactly the same function as in the example in pybluez that it doesn't work... The way BlueProximity gets the RSSI value is by parsing the output of 'hcitool' command. I'm not sure how slower/use more power would this be if I implemented it searching for it every minute or less.
If I get it to work, I'll probably need to restructure the way I collect BlueTooth devices, currently its just scan for MAC address and its name, associate that with the current GPS coordinates primary key and thats it.... What I'll probably need to do is drop the "friendly name" scanning, and only use the MAC address, which leads to the following problems:
  • Out of date name if used for a long time
  • Sometimes the name reported is the name for a different device.
    I see this fairly often with my Bluetooth GPS receiver... other devices showing up with its name.

No comments: