====== loci ====== {{monto.jpg?600|montage}} **loci** is Latin for places. Knowing about places is what loci is about. The eventual goal is to make the user aware of any the information available for a location, as well as contribute their own knowledge about locations. [[http://www.ece.utk.edu/~jgournea/loci.zip|The source is available!]] [[http://code.google.com/p/lociwiki/|Google Code project for loci]] ===== Overview : How it works ===== ==== live ==== {{live.png|how it works live}} This shows how loci works in the real world. loci was designed to be as non platform dependent as possible. However, for the scope of my project I only concentrated on getting my particular setup to work. Let me walk through what has to happen for loci to give a user information about their current location. - The GPS receiver has to have a location fix - loci on Windows Mobile reads the NMEA sequence from the GPS receiver from [[http://en.wikipedia.org/wiki/Bluetooth|bluetooth]] emulated serial port - loci on Windows Mobile gets the longitude and latitude and converts them into [[http://en.wikipedia.org/wiki/World_Geodetic_System|WGS 84]] - loci on Windows Mobile uses integrated web browser passing the coordinates as arguments to connect to the loci.web application - the loci.web php client checks the mysql database for all points near the location submitted. ==== in development ==== {{dev.png|how it was developed}} ===== The components ===== ==== logi gateway for windows mobile ==== loci {{pda-gps-disp.jpg |gps fix}} The job of this application is to read the GPS location, and then go to the loci website for those coords. This was written in C# within Visual Studio 2005. It can run on Windows Mobile 2003 and up. ==== loci website ==== {{pda-gps-web.jpg |website from within pda}} All the data is stored on the website. This part of the project was written using PHP with a MySQL database. === parts === == search.php == Searches the database for nearby coords. Also allows you to make new entries. It also allows you to edit, and delete old ones. == edit.php == This does the MySQL processing for editing a database entry. == add.php == This does the MySQL processing for adding a database entry. == delete.php == This does the MySQL processing for deleting a database entry. ==== MySQL ==== {{mysql-qb.jpg|}} loci.sql CREATE TABLE `map` ( `id` int(10) unsigned NOT NULL auto_increment, `time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `lat` double NOT NULL, `lng` double NOT NULL, `msg` varchar(10000) NOT NULL, `cat` varchar(1000) NOT NULL, `title` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ==== GPS Emulator ==== {{gpsemu.jpg|}} gpsemu.py {{loci-web.jpg|}} Because it is difficult to develop for something that is wholly dependent on GPS without having some way to control the GPS receiver I wrote a GPS Emulator in Python. This is a overview of how it works. - Coordinates are selected using google maps and written to a text file on the web server. - the gps emulator reads that text file off the web - Generates nmea sequences form the coordinates in that text file outputs to serial Because it is not possible to read the serial port that data is being written it becomes necessary to use a null-modem cable. [[http://com0com.sourceforge.net/|c0mc0m]] is a open source null modem cable that was very useful.