
Connect to Your GPS from Multiple Applications #57
Chapter 5, Mapping with Gadgets
|
255
HACK
If this happens, it’s because gpsd was written against gcc headers that your
particular system no longer supports. Fortunately, this is easy to fix. Run the
following bit of perl, and then run make again. Everything should build just
fine:
$ perl -pi -e 's/varargs.h/stdarg.h/g' *.c
$ make
Running gpsd
First, you’ll need to make sure your GPS receiver is on and properly con-
nected to your computer (see “The Serial Port to USB Conundrum”
[Hack #50]
if your computer doesn’t have a serial port). Next, you’ll want to be sure
your GPS receiver is configured to output NMEA-0183. Chances are good
that the GPS receiver has an option for this in a setup menu, but check your
owner’s manual to be sure. Several new models of Garmin GPS units no
longer speak NMEA. There is discussion of extending gpsd to support the
proprietary Garmin protocol, but if you are in the market for a new GPS,
you may want to add standards compliance to your list of purchase require-
ments!
NMEA-0183 is an industry-standard protocol, published by
the National Marine Electronics Association, for transmit-
ting position data over a serial line. The protocol consists of
a continuous stream of ASCII text “sentences,” sent at 4800
baud, that convey not just position information but poten-
tially also accuracy, speed, bearing, time, satellite visibility, ...