If you’re looking to make yourself a GPS navigator on your laptop / PDA / whatever, you can get it set up pretty quickly using an open source GPS navigation package called Navit.
For this walkthrough, we’ll make the assumption that you have a GPS receiver connected through serial or USB, and that you’re running ubuntu 9.04.
Before we get to the Navit stuff, we first need to get the GPS talking to the computer. For this we will use a GPS daemon called GPSd. In short, GPSd detects the type of GPS connected to your computer and allows multiple applications to use the positioning information at once. It also includes a bunch of tools for debugging which is useful.
GPSd is in the ubuntu repositories by default, so installing is as simple as
sudo apt-get install gpsd libgps-dev
Once that’s done, you can start the daemon by typing the following (assuming that you’re GPS is connected through /dev/ttyUSB0):
To test that the feed is working, run xgps from the konsole or krunner (Alt+F2).
Once the GPS daemon is running, it’s time to install Navit. You can grab the tarball from the Navit website. Save the tarball in your home directory and unpack it:
tar xvzf navit.tar.gz
This will create a directory called navit-0.1.1 (or similar). cd into that directory and compile the program (note that you will need internet access, for this step – Navit will download a sample map for you):
sudo make install
Navit is now installed. you can run it from the navit directory in the navit-0.1.1 directory:
Maps are your next issue. You can get maps for free from Open Street Map – save them into the navit-0.1.1/navit/maps directory. Next, we need to convert them to a format Navit can read. cd to the maps directory to which you saved the map and type (assuming your map is australia.osm):
cat australia.osm | ../osm2navit australia.bin
You now need to include this file in the configuration. Edit navit.xml in the navit-0.1.1/navit directory, search for <mapset (around about line 380) and add the following after the last mapset entry:
You can also turn off the example map by removing the sample map from the maps directory.
Once you’re done, fire up navit again and you’re good to go.