
224
|
Chapter 5, Mapping with Gadgets
#51 Speak in Geotongues: GPSBabel to the Rescue
HACK
the name of the input file (or the name of the input serial port); -o gpx speci-
fies the output is a GPX file; and
-F way.gpx (uppercase “F”) provides the
name of the output file (or output serial port).
You can then convert that GPX file to an HTML file that provides a sum-
mary list of the waypoints, with references to extended descriptions of each
point:
$ gpsbabel -i gpx -f way.gpx -o html -F way.html
Exchanging Waypoints and Tracklogs with a GPS
GPSBabel directly supports Garmin and Magellan GPS units. Connect your
GPS to your serial cable, or see “The Serial Port to USB Conundrum”
[Hack
#50]
if you lack a serial port. A Garmin serial GPS is specified with -i garmin,
while a Magellan is indicated with
-i magellan. Use the -f and -F parame-
ters to specify the serial port for your GPS: use
-f when you read from the
GPS and
-F to write to the GPS.
You can get more information by running
gpsbabel -? and by reading the
README file. Here is an example of a command that reads waypoints from
a Garmin GPS and writes them to a GPX-formatted file named waypoint.
gpx. Under Windows, assume the GPS is attached to the first serial port:
C:\> gpsbabel -i garmin -f com1 -o gpx -F waypoint.gpx
Under Linux, assume the GPS is attached to the first serial port (you will
need to run as a user who has rights to read the serial port, ...