GPS the open source way

Find Your Bearings

© milinz, 123RF

© milinz, 123RF

Author(s):

Open source GPS navigation systems show you the way to go home … or anywhere else you want to go.

GPS navigation systems are cheaper than chips these days, but if you already have a Linux-based laptop or netbook, you might want to try the open source route. All you need is a USB GPS receiver and a GPS navigation application. You can buy the former cheaply on eBay or in any store that carries GPS equipment. When it comes to GPS software, you have at least two choices: tangoGPS and GpsDrive. Both applications use mapping data from the OpenStreetMap (OSM) project [1], which provides maps of surprisingly good quality released under a Creative Commons license.

Keep in mind, though, that neither GpsDrive nor tangoGPS support turn-by-turn navigation and route planning – features reserved for commercial maps and software. What, you might wonder, is the point of using these applications if they lack some key features? Both GpsDrive and tangoGPS can come in handy in many situations. For example, both applications can save your route in the GPX format for use with other mapping applications or web services. GpsDrive and tangoGPS support waypoints and points of interest (POIs), so you can use both applications to store information about places and pin them on the map. The applications also offer features not available elsewhere. GpsDrive, for example, provides support for Kismet wireless network detector, so you can use it to map wireless networks, whereas tangoGPS includes a geotagging feature that lets you add geotags to your photos with ease. In other words, GpsDrive and tangoGPS might not replace a dedicated commercial navigation system, but both applications do have some nifty uses.

Before you install GpsDrive or tangoGPS, you have to enable support for external GPS receivers on your machine. To do this, you have to install the gpsd daemon software [2], which monitors the attached GPS receiver and makes the data collected from its sensors available for other applications.

Gpsd supports a huge number of GPS receivers, and its packaged version is available on many mainstream Linux distributions. This means that you can install gpsd easily with your distro's package manager. On Ubuntu, for example, you can install the software with the sudo apt-get install gpsd command. To activate gpsd and make it monitor the GPS receiver on a specific USB port, use the gpsd -n /dev/ttyUSB0 command. Once the GPS receiver is connected and enabled, you can put it to some practical use with the use of the tangoGPS or GpsDrive applications.

GpsDrive

GpsDrive [3] has been around for quite a while, so it has made its way to the software repositories of many popular Linux distributions. Once GpsDrive is installed, you can launch it from the Applications menu (Figure 1). By default, GpsDrive attempts to adjust its main window to the screen, but this doesn't work well all the time, especially on netbooks. In this case, you can launch GpsDrive from the command line with the -g (geometry) parameter that allows you to specify the desired height and width – for example: gpsdrive -g 800x600.

GpsDrive sports a functional dashboard that gives you a quick overview of the essential navigation data. As you would expect, the map window occupies most of the dashboard. The pointer that marks your current position on the map contains two arrows: one that indicates your current direction and another that points to the selected destination (Figure 2). The bottom pane of the dashboard contains a minimap and a compass, as well as distance, speed, and altitude indicators. At the very bottom of the dashboard you'll find the GPS Status indicator, the Map scale slider, and your current coordinates, bearing, and heading.

When you launch GpsDrive for the first time, it displays the NASA Blue Marble map. It might look good, but it's not particularly practical, so your first order of business is to download street maps for the desired region. Unfortunately, this is a rather cumbersome procedure. First, choose Options | Maps | Download. The important thing here is to select the desired value from the Scale drop-down list (Figure 2). This value determines the area and zoom level of the map you are about to download. By default, GpsDrive prompts you to download a map for the area surrounding your current position, but you can choose an alternative area by clicking on the desired place on the map.

Once the map is downloaded, you might need to restart GpsDrive for the map to appear. Using the Options | Maps | Download command, you can download more detailed maps of the same region and use the arrow buttons right below the Zoom In and Zoom Out buttons to switch between the downloaded maps. Make sure, though, that the Auto best map checkbox is unticked to do so; otherwise, GpsDrive automatically selects the most detailed map for you.

GpsDrive has two operation modes. In default mode, the application tracks your position on the map and automatically downloads maps as you leave "uncovered" areas. Obviously, you need an internet connection for this mode to work properly, which can be a problem when you are on the move. With the Position mode, you can use the keyboard arrow keys or mouse to navigate on the map. As soon as you click or place the marker on an area not covered by any of the downloaded maps, the application switches to the generic Blue Marble map. Then you can download maps manually with the Options | Maps | Download command. This way, you can download maps for the desired region and then use them offline.

Points of Interest

GpsDrive also offers support for POIs, and the application makes it easy to add and manage places on the map. To add a new POI, press and hold the Ctrl key, then click with the mouse on the map where you want insert a POI. This opens the Add Point of Interest dialog window (Figure 3). The Type drop-down list provides a large collection of POI types complete with icons, which makes it easier to identify the POI on the map. To add the POI, give it a name, choose the type you want, provide an optional comment, and press OK. To display POIs on the map, make sure that the WP checkbox in the left pane of the dashboard is ticked.

Although GpsDrive lacks route-planning capabilities, it does provide a rudimentary and slightly quirky routing feature that creates a straight route from your current position to a POI on the map (Figure 4). For example, if you want to create a route to the nearest bookstore, press the Find button and select the bookstore POI as your destination. Next, press Create route and hit the Select all WP as route button to add all existing POIs. Then select the bookstore POI and press the Start route button. In a similar manner, you can create routes that include several POIs.

POIs are not the only thing GpsDrive can handle. The Friends feature allows you to see other GpsDrive users close to your current position. To enable this feature, choose Options | Preferences and switch to the Friends section. Tick the Enable friend service checkbox and enter the name you want in the Your name field. The Show position newer than field allows you to specify how up-to-date the data should be. For example, if you only want to see users that are currently connected to GpsDrive's friend server, you might want to set the field to one to three minutes. Now press the Lookup button to find your IP address, then press OK, and you should see other users close to you. For each user, you can see his or her name, travel mode (car, bike, walk, etc.), and current speed. Better yet, GpsDrive allows you to send instant messages to any active user with the Options | Send Message command.

tangoGPS

Although GpsDrive is a competent application, it can be a bit cumbersome in use. Moreover, it feels more like a desktop application than a tool to use on the move. So if you want to use your netbook or laptop for navigation when you are traveling by car or train, you might want to give tangoGPS [4] a try. To install tangoGPS, simply grab the packaged version for your system from the project's website.

The first thing you notice when you launch tangoGPS is its clean and functional interface (Figure 5). Its design does not stand in your way and makes your interaction with the application as straightforward as possible. The buttons at the top of the tangoGPS window allow you to switch to full-screen mode, zoom in and out on the map, and automatically center the map according to your current position, which is indicated by a blue marker. Instead of zoom buttons, you can use the slider on the right edge of the window for more precise zoom control. TangoGPS supports several keyboard shortcuts that allow you to control the application without using the mouse. For example, the PageUp and PageDown keys let you control zoom, and you can use the Space bar to toggle full-screen mode.

As soon as tangoGPS has acquired your position, it automatically downloads maps for the surrounding area, and it continues to download additional maps as you move or zoom on the map. TangoGPS also makes it very easy to download maps for offline use. To do this, right-click on the main map and select the Map Download menu item from the context menu. This opens the Map DL dialog. Here, select the desired zoom level and press OK. TangoGPS stores all the downloaded maps in a specified directory on your hard disk, so you only have to fetch maps once.

Read full article as PDF:

Related content

comments powered by Disqus

Direct Download

Read full article as PDF:

News