Saturday, February 23, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 3

Next on the list are some GPS mapping softwares for linux. A popular one is GPSdrive. Installation was easy, Ubuntu has a debian package in its repositories. Sadly, does not have decent maps for India (see below) . Will, pass for now.

Now we try Navit. By default it too does not have maps for India. But, the documentation says that it works with the following -

- OpenStreetMaps : display, routing, but street name search isn't complete
(see )
- Grosser Reiseplaner and compliant maps : full support
(see )
- Garmin maps : display, routing is being worked on
(see )

Install Navit
cvs login
cvs -z3 co -P navit
cd navit
make check
sudo make install

download planet.bin into /usr/local/share/navit/maps/ from: (1.3 GB file)
sudo gedit /usr/local/share/navit/navit.xml
map type="garmin" enabled="yes" data="$NAVIT_SHAREDIR/maps/planet.bin"

Optionally, If you don't want to download the maps for the whole planet you can try getting only the map tiles you are interested in:
wget -O map.osm,17.3825,73.56, 88,17.6825
the format is:
you can get the co-ordinates from:

Finally, If you would rather prefer Garmin maps (but, mind it these are pretty hopeless for India):

svn co libgarmin
cd libgarmin
sudo make install
re configure and re make Navit.

download garmin map tiles from:
sudo gedit /usr/local/share/navit/navit.xml
map type="garmin" enabled="yes" data="/usr/local/share/navit/maps/73551480.img" debug="4"

Friday, February 22, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 2

Well, the first though that struck me, was ah ha! why not Google Earth. Got me self a subscription to Google Earth plus only to be disappointed - it cannot talk to gpsd. Canceled my subscription. But, don't loose heart. Download the and gps.kml from here.

rfcomm connect 4
gpsd -n /dev/rfcomm4

gps = serial.Serial('/dev/rfcomm4', 4800, timeout=1)
In google earth open > gps.kml

What this does is this - it reads the NMEA formated string and generates the KML (Keyhole Markup Language) formated file called. /tmp/nmea.kml, which is then read by google earth at 1 second intervals.

As a side note, remember to make sure you don't have xgps running simultaneously with this script. I guess since both of them read from the same device at the same time, it causes the python script to fail as it tries to parse the partial NMEA strings at times (parts of the string may have been read from the buffer by xgps).

Okie dokey so far so good.

I have been talking about this NMEA string. If you like you can use the python script to make your own script to peek at the NMEA string that is sent by your device. Here is what it looks like


excerpt from Wiki
"NMEA 0183 (or NMEA for short) is a combined electrical and data specification for communication between marine electronic devices such as echo sounder, sonars, Anemometer (winds speed and direction), gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the US-based National Marine Electronics Association."

cool isn't it?


Thursday, February 21, 2008

Playing with Freedom Keychain GPS 2000 on Gutsy Gibbon - Part 1

Just received this interesting little GPS receiver from Freedom Input. It is capable of receiving from 51 channels simultaneously. Freedom input sells 2 keychain GPS's. The original Freedom Keychain GPS and the keychain GPS 2000. The first one uses the SIRF III chipset and the latter uses the latest MTK chipset. Sirf III, as, maybe the name suggests is on its third revision, whereas, this is MTK's debut into the GPS world (and I reckon quite a good one). The 2000 version is more compact than the original and has 4 separate indicator lights for the various activities. Some would still prefer the Sirf III chipset, as it has a proven track record. After much brooding I decided to go in for the latter i.e. GPS 2000. Mind it neither comes bundled with any software, but, are supposed to be compatible with popular mapping softwares available.

Now the hard part getting all this to work in Ubuntu. After a hard days night, here is what I got.
In gist this is what I did (apply common sense where stuck)

hcitool scan
sdptool browse
sudo gedit /etc/bluetooth/rfcomm.conf

rfcomm4 {
bind yes;
device <>;
channel 1;
comment “Serial Port”;

rfcomm connect 4
sudo apt-get install gpsd gpsd-clients
gpsd -n /dev/rfcomm4

Basically, we are creating a serial port /dev/rfcomm4 binding to the bluetooth device and then making the gpsd daemon talk to the port. The gpsd daemon then listens and services any requests for the standard GPS NMEA data. And voila..

The picture above shows the satellites that GPS device has latched onto. If it latches onto more than 3 satellites it is able to provide a 3D fix, which means, it can in addition to your position tell you your altitude. I think EPH tells you the horizontal accuracy and EPV tells you the vertical accuracy. Okay, now to get this to work with some freely available mapping software keep checking.

If still stuck check out these links