Finding Your Way with GpsDrive

Lots of tools can plot your position on a map, but this one displays your friends' positions, enables multiple map sources, and more.

The Egyptians invented geometry, the mathematical basis of surveying. The Nile's annual floods removed markers and forced those tidy bureaucrats to re-measure roads, fields and other features of the landscape.

Gunpowder came to western hands, and long-range artillery was invented. This required precisely locating naval and artillery guns, as well as their targets. So, the military has had a longtime interest in the art of locating things, and they have refined the techniques that the Egyptians first pioneered.

In the 1970s, the US Department of Defense (DoD) started work on the Global Positioning System (GPS). This put a constellation of 24 satellites in low-Earth orbit. GPS allowed instantaneous fixes accurate to within a few tens of meters. The Soviets launched a similar system, Glonass, which Russia still maintains. And, the EU has begun work on an improved system of its own, Galileo, to be deployed in 2008.

The military is happy; they now can locate targets with much greater accuracy. However, as with another DoD project, the Internet Protocol, the civil spinoffs may far outweigh any military benefits. We can now use GPS to locate errant hikers, help distressed vessels and search for oil wells far more precisely and cheaply than with previous techniques. Indeed, the EU sees Galileo primarily as a commercial venture.

All three systems are based on atomic clocks aboard the satellites. The receiver uses time signals to tell its distance from each satellite. Spherical geometry tells us that three satellites give a fix in two dimensions. A fix in three dimensions requires a minimum of four satellites. Modern GPS receivers can track as many as 12 satellites, the most they can see at any one time.

Because of the frequencies and signal strengths at which GPS operates, the major constraint on GPS receivers these days is that one must be outdoors, or nearly so, or have a remote antenna, in order to track satellites.

What Is GpsDrive?

GpsDrive is a program licensed under the GNU General Public License (GPL) for displaying one's position in real time. It operates on most laptops running Linux, and on Linux-driven PDAs, such as the Yopy and Zaurus. Currently, 12 languages are supported.

Before we begin, a word of warning: never consider GPS as anything but an adjunct or supplement to other tools of navigation. The advent of GPS is not occasion to dump your copy of Bowditch.

Getting It Running

GpsDrive requires the Gnome Toolkit plus (GTK+), version 2.2 or higher, which comes with most Linux distributions. Anti-aliasing fonts are nice but not required.

MySQL can store waypoints, and GpsDrive will automatically use it if possible.

Kismet is a wireless sniffer, a tool for detecting Wi-Fi access points. As Kismet detects them, GpsDrive automatically turns the contact information into waypoints and stores them in MySQL. This turns GpsDrive into an excellent tool for wardriving.

Festival is a voice output program for Linux. GpsDrive uses it for voice delivery of comments as you approach waypoints. It is an excellent safety feature for mobile GpsDrive users. Flite is a stripped-down version of Festival.

Installation

Installing GpsDrive is straightforward for those familiar with typical package installation.

Get GpsDrive from its home page or mirrors indicated on its Web site (see the on-line Resources). You can get tarballs, md5sums and RPM packages for the latest stable versions. You also can get the latest work-in-progress quality version from anonymous CVS. The tarball version is the more flexible, as you can remove some of the components you don't plan to use.

To install a tarball, copy it to a suitable location. Then do the following:

tar -xvzf gpsdrive*tar.gz
cd gpsdrive
./configure
make

If you are using only the NMEA protocol and don't need the GARMIN protocol, configure GpsDrive with:

./configure --disable-garmin

You can append --enable-auto-optimization for optimized compiler flags.

Then, as root, install the program, the gpsd dæmon and the language files. Run:

make install

RPM installation is the usual:

rpm -ivh gpsdrive*.rpm

Once installation is complete, you should be able to read the man page, which has the latest information.

The first thing to do is to see if GpsDrive works with your GPS receiver. To test the system, fire up gpsd, a dæmon that serves the raw GPS data. It will listen on /dev/gps, unless you tell it otherwise on the command line with the -p option:

gpsd -p /dev/ttyS1

Because you should run GpsDrive and gpsd as a non-root user, make sure that user has read and write permission on the device.

Once gpsd is running, run:

telnet localhost 2947

When you get the connect message, press the R key, and gpsd will start feeding you raw NMEA sentences, like so:

[ccurley@charlesc ccurley]$ telnet teckla 2947
Trying 192.168.1.32...
Connected to teckla.
Escape character is '^]'.
r
GPSD,R=1
$PRWIRID,12,01.05,07/29/96,0003,*46
$GPRMC,235947,V,4333.1694,N,10812.0068,W,0.000,0.0,120895,13.3,E*42
$PRWIZCH,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0*4D
ASTRAL
ASTRAL
$GPRMC,235949,V,4333.1694,N,10812.0068,W,0.000,0.0,120895,13.3,E*4C
....
GPSD,R=0
^]

telnet> quit
Connection closed.

This works even when the receiver can't get any signal, because the receiver will send data indicating that it doesn't have any signal.

Once you know which device your GPS receiver is on, make a symlink (as root) to /dev/gps so that gspd or gpsdrive can use the default:

ln -s /dev/ttyS0 /dev/gps

You can set the device name in the GpsDrive GUI, but gpsd won't use that setting.

If you are going to use MySQL for waypoint storage, which is required for Kismet, see the file README.SQL. You need to feed the file create.sql into MySQL's command-line client, so you must have appropriate permissions in MySQL. You can use any reasonable MySQL client to edit your waypoints, including OpenOffice.org.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

gpsdrive street level routing data

George Beranek's picture

Wouldn't the files freely available at
http://roadmap.digitalomaha.net/maps/ provide an open source of street-level routine data?
see also:
http://roadmap.digitalomaha.net/maps.html
http://roadmap.digitalomaha.net/

gpsdrive street level routing data

Tim's picture

Nice if you live in the US! Here you have to pay for those sort of maps.

http:/www.openstreetmap.org has a project running to produce free streetmap data & it needs gps tracks and people with local knowledge. Please take a look to see how all of us can help by working on where we live, work or visit.

How to load the nasa map?

Anonymous's picture

I've read the README, but I can't seem to get the nasa satellite map to load. Maybe a bit of help from you (since you got it to work) would be valuable for people reading this article. These are the steps I took:

1. Downloaded MOD09A1.E.interpol.cyl.retouched.topo.3x21600x21600.gz
2. gunzipped it, and moved it to ~/.gpsdrive/nasamaps/top_nasamap_east.raw
3. Start gpsdrive, and "misc menu" -> "maps" -> "import map"
4. I've tried various combinations of coords and screen x/y values, but every time I "browse filename" during step 1, I get a "mapfile could not be loaded".

This is using gpsdrive 2.09 _without_ a gps receiver attached... just in simulation mode. Thanks in advance for any suggestions.

w2222222222

phong's picture

i want to get maps to study

This is APRS like.

n8xja's picture

Well, sort of. This is sort of APRS like. APRS is a ham radio "automatic position reporting system" that has been around for some time now (see www.aprs.net and for an interesting application: www.findu.com). In the bowles of the sites, you can find maps that may be compatable. The main feature aprs has that we don't have here, are that positions in APRS can be sent via ham radio, and there are other thing aprs will do such as 2 way messaging, and that arps is also suitable to aid in disaster situations. I am not saying that one is the better than the other, rather, both has had some good development and both systems may be able to benefit from the work already done on the other.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix