Table of Contents
List of Examples
Table of Contents
There are simply too many gratuitously different file formats to hold waypoint, track, and route information in various programs used by computers and GPS receivers. GPX defines a standard in XML to contain all the data, but there are too many programs that don't understand it yet and too much data that are in an alternate formats.
I needed to convert waypoints between a couple of formats, so I whipped up a converter and based it on an extensible foundation so that it was easy to add new formats. Most file formats added so far have taken under 200 lines of reasonable ISO C so they can be stamped out pretty trivially. Formats that are ASCII text delimited in some fixed way can be added with no programming at all via our 'style' mechanism.
GPSBabel is distributed "ready to run" on most common operating systems via the download page.
As GPSBabel runs on a wide variety of operating systems, be sure to visit the OS-Specific notes for additional information.
For operating systems where no binary is provided or if you want the latest development version, you will have to build it from source. The code should be compilable on any system with ISO C89 compilers. It's been tested on UnixWare, OpenServer, OS/X, Linux, Solaris, and a variety of processors and compilers.
In most cases, the code is as simple to build as running:
./configure && make
Expat is strongly recommended for source builds as it is required for reading all the XML formats such as GPX.
libusb is recommended for OS/X and Linux if you want to use a USB Garmin.
There are additional flags that can be passed to configure to customize your build of GPSBabel.
./configure --help
lists all the supported options, but additionally we have:
--disable-shapefile Excludes the shapefile support.
--disable-pdb Excludes the Palm database support and all formats that rely on it.
--disable-csv Excludes all support for our something-separated formats.
--disable-filters Excludes all filter support.
--enable-efence Activate debugging mode for gpsbabel-debug.
--with-doc=dir Specify that the doc should be created and installed in dir.
--without-libusb Disables use of libusb, even it's it's available.
--with-zlib=(included)|system|no By default, we use our own version of zlib. If you specify system the system zlib is used. A value of no (or --without-zlib) disables zlib.
Table of Contents
Invocation was meant to be flexible. Unfortunately, that can sometimes lead to unwieldy command lines.
If you're using GPSBabel, you will need to know how to do at least two things: read data from a file, and write it to another file. There are four basic commands you need to know to do those things:
| Command | Meaning |
|---|---|
-i format | Set input format |
-f filename | Read file |
-o format | Set output format |
-F filename | Write output File |
The format parameters in the above list
refer to the names of formats or file types supported by GPSBabel.
gpsbabel -?
will always show you the supported file types. In this document, the various supported formats are listed in Chapter 3, The Formats. The name that you would use on the command line follows the format name in parentheses.
The filename parameters specify the
name of a file to be read or written.
To use this program, just tell it what you're reading, where to read it from, what you're writing, and what to write it to. For example:
gpsbabel -i geo -f /tmp/geocaching.loc -o gpx -F /tmp/geocaching.gpx
tells it to read the file "/tmp/geocaching.loc" in geocaching.com format and create a new file in GPX format.
This command will read from a Magellan unit attached to the first serial port on a Linux system (device names will vary on other OSes) and write them as a geocaching loc file. The second command does the same on Microsoft Windows.
gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc
gpsbabel -i magellan -f com1 -o geo -F mag.loc
Optionally, you may specify "-s" in any command line. This
causes the program to ignore any "short" names that may be
present in the source data format and synthesize one from the
long name. This is particularly useful if you're writing to
a target format that isn't the lowest common denominator but
the source data was written for the lowest common
denominator. I use this for writing data from geocaching.com
to my Magellan so my waypoints have "real" names instead of
the 'GC1234' ones that are optimized for NMEA-only receivers.
A geocacher with a Magellan receiver may thus find commands
like this useful.
gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0
gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1
Argument are processed in the order they appear on the command line and are translated internally into a pipeline that data flows through when executed. Normally one would:
| read from one input |
| optionally apply filters |
| write into one output |
but GPSBabel is flexible enough to allow more complicated operations such as reading from several files (potentially of different types), applying a filter, reading more data, then write the merged data to multiple destinations.
The input file type remains unchanged until a new
-i argument is seen.
Files are read in the order they appear. So you could merge
three input files into one output file with:
gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc
You can merge files of different types:
gpsbabel -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx \ -o gpsutil -F big.gps
You can write the same data in different output formats:
gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx 1.wpt
If you want to change the character set of input or/and
output side you can do this with the option -c
<character set>. You can get a complete list
of supported character sets with "gpsbabel -l". To change
the character set on both sides you should do this:
gpsbabel -i xcsv,style=foo.style -c latin1 -f foo \ -o xcsv,style=bar.style -c ms-ansi -F bar
Note, that some formats has a fixed character set and ignore this option.
Most formats will make reasonable attempt to work
transparently with waypoints, tracks, and routes. Some
formats, like 'garmin' and 'magellan' require the -t flag to work with tracks and
-r to work with
routes. -w is for
waypoints, and is the default. So if you wanted to read all
data from your unit into a gpx file, you might use a command
like:
gpsbabel -t -r -w -i magellan -f com1: -o gpx -F backup.gpx
Tracks and routes are advanced features and don't try to handle every possible hazard that can be encountered during a conversion. If you're merging or converting files of similar limitations, things work very well.
Tracks and routes will sometimes be converted to a list of waypoints when necessary, f.i. when writing into one of the CSV formats. The inverse operation is not supported right now, so reading the converted track back from CSV will always result in a list of waypoints, not the original track.
The presence of -s on the command line tends to
creats havoc on tracks and routes since many of these formats
rely on internal linkages between such points and renaming
them may break those linkages. In general, don't use
-s when tracks or
routes are present.
GPSBabel can read a file on startup to set defaults for options. All module and filter options may be set this way.
The format of the file is identical to the inifile-format often seen on Windows. Here is an example:
| [Common format settings] |
| snupper=Y |
| snlen=10 |
| [gpx] |
| gpxver=1.1 |
| [magellan] |
| baud=115200 |
| [tiger] |
| [Garmin categories] |
| ; any # from 1 to 16 |
| 1=fixed waypoints |
| 2=temporary waypoints |
Each section of the file starts with a '[section]' header followed by any number of lines formatted option=value. Leading and trailing whitespace will be automatically removed from header, option and value items. Lines starting with '#' or ';' will be treated as comments and ignored.
There are three optional sections.
"Common format settings"
Any option from any of the formats listed here will be used by GPSBabel unless explictly provided on the command line.
"Common filter settings"
As above, but for filters.
Garmin categories
This allows you to give readable names to the numeric categories used internally in some Garmin devices and the Mapsource formats such as GDB and MPS. This is information is also used by our GPX and garmin_txt formats as well.
By default, GPSBabel tries at startup to load the file named
gpsbabel.ini from the following locations:
current working directory
Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment.
Unix like OS'ses: ${HOME}/.gpsbabel/, /usr/local/etc/ and /etc/
If the -p option is specified, the above locations are not searched.
Only the filename specified by that option will be used.
There may be situations where predefined values are not useable (i.e. wrapper applications using GPSBabel in the background). The inifile mechanism can be disabled with an empty filename.
gpsbabel -p "" -i gpx -f something.gpx -o tiger -F -
Introduced in GPSBabel 1.3.1, we now have an experimental feature for realtime tracking via the new '-T' option. This reads position reports from selected formats and writes an output file when a position report is received.
As of this writing, Garmin's PVT protocol and NMEA are supported inputs and KML is supported on output. Additional formats may be added by interested parties later.
gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml
Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically, suitable for a self-refreshing network link in Google Earth.
In addition to reading arguments from the command line, GPSBabel can read directions from batch (or command) files via the '-b' option.
These files are ideal for holding long command lines, long file lists, complex filters and so on. You can use all GPSBabel options and combinations when writing such files. Nesting batch files by using the '-b' option within a batch file is supported.
Here is an example demonstrating segmenting a large command line by placing the input and filtering directives in a file called 'all_my_files'.
gpsbabel -b all_my_files -o gdb -F all_my_tracks.gdb
'all_my_files' could look like this:
| -i gpx |
| -f saxony_in_summer_2004.gpx -f austria_2005.gpx |
| -i gdb |
| -f croatia_2006.gdb |
| -x nuketypes,waypoints,routes |
| -x track,pack,split,title="LOG # %Y%m%d" |
Table of Contents
This format can...
read and write waypoints
This format is a very flexible module that can be used to read or write nearly any plain-text record-based waypoint file. This flexibility is achieved by combining this format with "style" files that describe the format of the waypoint files.
There are several formats built in to GPSBabel that use the underlying xcsv
machinery. Each of those formats takes the same options as the xcsv format,
with the obvious exception of the style option.
Those formats are all based on style files that can be found in
the "style" directory in the GPSBabel source distribution.
Full path to XCSV style file.
This option specifies the style file that defines the records to be read on input or written on output. This is not a valid option for the various built-in xcsv-based styles; they have prebuilt style definitions.
For information on the format of xcsv style files, see Appendix C, GPSBabel XCSV Style Files.
Max synthesized shortname length.
This option specifies the maximum allowable length for a short name on output. This option overrides the style file.
Valid values for this option are 0 (off) and 1 (on).
Allow whitespace synth. shortnames.
When this option is specified, GPSBabel will allow whitespace (spaces or tabs) in generated short names. This option overrides the style file.
Valid values for this option are 0 (off) and 1 (on).
UPPERCASE synth. shortnames.
When this option is specified, GPSBabel will make all short names contain only UPPERCASE characters. This option overrides the style file.
Valid values for this option are 0 (off) and 1 (on).
Make synth. shortnames unique.
When this option is specified, GPSBabel will ensure that all short names are unique within the output file. This option overrides the style file.
Valid values for this option are 0 (off) and 1 (on).
Basename prepended to URL on output.
This option specifies the base name to prepend to a URL on output. This might be useful if an input file contains URLs in a relative format and you need them to be in an absolute format.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This format, like the custom format, is mainly used for the purpose of testing GPSBabel. It is supposed to contain one field for each piece of information supported by the xcsv format writer, but it may not be entirely in sync with the documentation at Appendix C, GPSBabel XCSV Style Files.
For a list of fields, see the style/tabsep.style file in the GPSBabel source distribution.
This format can...
read and write waypoints
read and write tracks
read and write routes
Serial download protocol for the Brauniger IQ series of barograph recording flight instruments. This format creates a track of altitude vs time which can be merged with a GPS track of the same flight to create a three dimensional IGC file.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Support for Cambridge/Winpilot flight analysis and planning software for glider pilots.
This format can...
read waypoints
read tracks
read routes
With this format we can read CarteSurTable data files. CarteSurTable is a shareware program widely used in France. The data inside have to be seen as a mixture of a waypoints list, one route and several tracks. phgiraud.free.fr
This format can...
read and write waypoints
read tracks
Cetus GPS www.cetusgps.dk is a program for Palm/OS. Working with Ron Parker and Kjeld Jensen, we can now read and write files for that program.
Database name.
This option specifies the database name for the output file. This name is not the same thing as the file name on your computer; this is the name that appears in the file browser on your handheld.
Append icon_descr to description.
This option will add the icon description to the end of the waypoint description on output. This can be useful if the icon is used to convey important information about the waypoint. For example, the icon might be "found geocache" or "unfound geocache"; it might be useful to know that when looking at a list of icons in Cetus.
This format can...
read and write waypoints
read and write routes
This is the format used by CoastalExplorer (tm). The format is XML with items uniquely identified by Windows-style UUIDs. http://www.rosepointnav.com
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
There are a billion variants of Comma Separated Value data. This is the one that makes Delorme S&A Deluxe 9 happy. It's also a very simple program and useful for many other programs like spreadsheets.
CSV is also the correct format for Lowrance MapCreate, their commercial mapping program, or GDM6 (their free waypoint manager) for iFinder which is available at lowrance.com
This format can...
read and write waypoints
read and write tracks
read and write routes
These data files are "character" separated text files like the pcx format. "Character" means special data lines can have their own separator.
Since release 6.1 of CompeGPS™, GPX is also a supported import/export format for waypoints, routes and tracks.
For more information please have a look at http://www.compegps.com
Index of route/track to write (if more the one in source).
Because this format supports only one route or track, this option may be used on output to select a single route or track from a collection of routes and tracks read from a more expressive format. If you have, say, a gpx file that contains two routes, you may use this option to write them one at a time to individual files.
gpsbabel -i gpx -f routes.gpx -o compegps,index=1 -F route1.txt -o compegps,index=2 -F route2.txt
Give points (waypoints/route points) a default radius (proximity).
This option specifies the default proximity for waypoints and route points.
This format can...
read and write waypoints
This code is mostly intended to convert CoPilot Flight Planner for Palmd/OS atabases into other formats. You probably should not use this to write CoPilot databases, although the code is there, because GPSBabel doesn't convert magnetic declination values.
Questions, bug reports, etc, to ptomblin at xcski.com
http://xcski.com/~ptomblin/CoPilot/ and http://navaid.com/CoPilot
This format can...
read and write waypoints
read tracks
This format supports cotoGPS™, a Palm GPS program. It can read both track and marker (waypoint) files. It is currently unable to write track files, so only marker files can be written. The marker categories are written to and read from the icon description. The 'Not Assigned' category leaves the icon description empty on read. Currently geocache info is ignored.
In addition to the documented options, this format also has a
debugging option called internals which takes an XCSV
delimiter value. It writes some internal values (distance, arc, x and y)
of the cotoGPS track format to the notes field.
Contributed by Tobias Minich.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This format is not actually used by any real product. It is most useful for debugging purposes when developing a new format module for GPSBabel.
To understand the contents of this file, look at the
style/custom.style file in the GPSBabel source
distribution as well as Appendix C, GPSBabel XCSV Style Files.
This format can...
read tracks
This format reads the binary (.gpb) track logs recorded on Dell Axim Navigation Systems.
This is a read-only format for now as the format was reverse engineered and there are many unknown bytes. We can successfully extract the common GPS data.
This format can...
read and write waypoints
read and write tracks
read and write routes
This format supports the DeLorme ".an1" drawing file format. It can currently be used to either read or write drawing files. If you use this format to create drawing files with routes or waypoints from another source, by default it will create "Red Flag" symbols for waypoints, and thick red lines for routes or tracks. It is possible to merge two drawing layers by doing something like this:
gpsbabel -i an1 -f one.an1 -f two.an1 -o an1 -F merged.an1
In this case, the merged data will contain all of the properties of the original data.
Type of .an1 file.
This option specifies the type of the drawing layer to be created. The supported values are "drawing", "road", "trail", "waypoint", or "track". If you do not specify a type, the default will be either the type of the previous an1 file or "drawing" if there is no previous file. This lets you merge, for example, two road layers without having to specify "type=road" for the output.
Road type changes.
If you are creating a road layer, you may use the "road" option, which allows you to change the types of roads based on their names. You can change multiple roads at the same time. Currently supported types are
| Type | Meaning |
|---|---|
| limited | Limited-access freeways |
| toll | Limited-access toll highways |
| ramp | Access ramps for limited-access highways |
| us | National highways (e.g. US routes) |
| primary | Primary State/Provincial routes |
| state | State/Provincial routes |
| major | Major Connectors |
| ferry | Ferry Routes |
| local | Local Roads |
| editable | User-drawn Roads |
GPSBabel defaults to creating editable roads. These are routed just like local roads, but may be edited with the drawing tools in Street Atlas.
This option has a special format that is best demonstrated by example:
"road=I-599!limited!Beecher St.!major"
This option will cause any road named "I-599" to become a limited-access highway and any road named "Beecher St." to become a major connector. Note that roads that have had their types changed in this way are not editable in Street Atlas, so make sure they are where you want them before you change them, and make sure to keep a backup of your original road layer. Note that the ! is a shell metacharacter in bash and possibly other shells, so you may have to use single quotes or some other escape mechanism.
There is a tutorial on how to create an onramp for a limited access highway in Street Atlas USA using GPSBabel.
Do not add geocache data to description.
If your original data contains geocaching-specific information such as difficulty and terrain, GPSBabel will automatically include that information in the waypoint descriptions in the generated drawing file. If you do not want that, specify the "nogc" option on the command line:
gpsbabel -i gpx -f 12345.gpx -o an1,nogc -F 12345.an1
Symbol to use for point data.
This option allows you to specify which symbol to use for points that don't have a symbol already. It defaults to "Red Flag" but it accepts any symbol name you can put in a DeLorme export file. To find the name of a specific symbol in Street Atlas, let the mouse pointer hover over it for a few seconds and the name will be displayed.
Color for lines or mapnotes.
This option allows you to specify the color for line or mapnote data. It accepts color names of the form "#FF0000" (red) or any of the color names from the Cascading Style Sheets (CSS) specification.
Zoom level to reduce points.
This option specifies at what zoom level Street Atlas will begin showing reduced versions of your symbols. The default is 10. Setting zoom to 0 will disable this feature. Setting it to anything but the default will override the zoom level specified on any waypoints that were read from an existing an1 file; this is by design.
Waypoint type.
This option specifies how to represent point data in the draw file. Valid waypoint types are "symbol", "text", "mapnote", "circle", and "image". The default is "symbol".
If you specify a waypoint type of "image", you should make sure that the icon descriptions of your waypoints are the full names, including drive letters and full path, of image files in a format that works with your DeLorme product. Note that this means that the .an1 file you generate will not work on any computer that does not have those images in the same place; this is part of the design of the an1 format and cannot be avoided.
This format can...
read and write tracks
This is the 'gpl' format as used in Delorme mapping products. It is a track format and contains little more than the tracklog of a GPS that was attached while driving. frontiernet.net
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This format is for Street Atlas USA 2004 Plus.
For geocachers importing data from a tool like GSAK or Spinner, import the file twice in XData. One will create a file with the Cache description as a hyperlink on the flag. This can clutter up the screen and when you try to zoom in, it causes problems. So the second one will only have a flag. Thus you can turn off and on which one you want to view. The first time you import the file, in the assign field types, check the circle above Full Name and then next. The second time you import the file do not check any circle and in the second to last column, change URL to none and then click next. Use the same name you used the first time but add -Flag to it.
This format can...
read tracks
This format reads route files from many Delorme mapping products. It supports the anr, rte, and rtd formats as either tracks or routes.
All options only apply to route files from newer (anr) versions of DeLorme software; older versions didn't store the turn information with the route.
Keep turns if simplify filter is used.
This option only makes sense in conjunction with the 'simplify' filter. It ensures that the route simplification process will remove the points corresponding to turns only after it has removed all other route points.
Only read turns; skip all other points.
This option causes GPSBabel to read only the waypoints associated with named turns. This should create a list of waypoints that correspond to the itinerary from Street Atlas.
Split into multiple routes at turns.
This option causes GPSBabel to create separate routes for each street, creating a new route at each turn point. For obvious reasons, 'split' cannot be used at the same time as the 'turns_only' or 'turns_important' options.
Read control points as waypoint/route/none.
This option lets you read the control points (start, end, vias, and stops) for your route as well as the route itself. The default for this option is 'none', which won't read the control points. You may also specify 'waypoints', which reads the control points as waypoints, or 'route', which creates an extra route named 'control points' containing just the control points in order. Note that if your goal is to create an arc or other CSV file, you should use 'none' (or not use this option, which is the same thing.)
Synthesize track times.
This option causes GPSBabel to read the route as if it were a track, synthesizing times starting from the current time, using the estimated travel times specified in your route file (you can change your travel speeds in the DeLorme product you used to create the route file.)
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Delorme TopoUSA/XMap Conduit is one of the billion CSV variants mentioned above. It's just like S&A with the addition of a completely pointless line at the beginning and end of the file. This is the format used to hot-sync to XMap from withing TopoUSA. Done with help of Dan Edwards.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Delorme XMap2006 Conduit is just like XMap, except there are no spaces between fields and the coordinate format is slightly different. The completely pointless header and footer lines are the same, at least. Use this to create the XMapHHWptsSend.txt file needed to sync to Street Atlas Handheld 2006.
Note that in order to keep from creating duplicates on your handheld, you must first remove the file "XMapWptsDB" from your handheld, restart SAHH2006 on the handheld to create an empty database, and THEN sync the new file.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Delorme XMapHandHeld Street Atlas USA is another of the billion CSV variants. This is the format used by XmapHH SA USA on (at least) PocketPC O/S.
This XMap is not the same as the simpler XMap format, which is used with Topo USA 4.0 and XMapHH for Palm.
Delorme XMap Handheld .WPT for PocketPC is a bit of a kludge. This chapter covers XMap Handheld Street Atlas USA edition.
XMap on the PocketPC stores its waypoints in individual .wpt files. For example, waypoints generated by XMap on the PocketPC are stored by default in the "My Documents" folder using the sequential names "XMap1.wpt", "XMap2.wpt", ad nauseum. Needless to say, this is not very efficient.
As writing multiple waypoint files is outside of the scope of GPSBabel, GPSBabel chooses to write one big file, one waypoint per line. Extracting lines from this file is left as an exercise for the end user. A simple Perl script to handle this conversion is included at the end of this chapter.
It should also be noted that reading multiple files is indeed possible, but if you have more than a few points, it can be a task. For example:
gpsbabel -i xmapwpt -f Xmap1.wpt -f Xmap2.wpt -o mapsend -F mapsend.wpt
will read the two Xmap .wpt files and write one mapsend file. This is fine for a small handful of points, but could be quite cumbersome for folks like me who have 100+ waypoints loaded into XMap. For *nix folks, something as simple as:
cat *.wpt > /tmp/foo.wpt gpsbabel -i xmapwpt -f foo.wpt -o mapsend -F mapsend.wpt
will do the trick just fine.
#!/full/path/to/perl
$INPUTFILE = @ARGV[0];
$TARGETDIR = @ARGV[1];
$FILENAME = @ARGV[2];
if (! $FILENAME) {
print "Usage: xmap_split.pl INPUT_FILE OUTPUT_DIRECTORY FILENAME_BASE\n";
print " (i.e. xmapl_split.pl points.wpt /tmp/points GPSB)\n";
print " (created GPSB0001-GPSBXXXX in /tmp/points/ from points.wpt)\n";
exit;
}
open (INFILE, $INPUTFILE) || die "Cannot open $INPUTFILE for read!\n";
while (<INFILE>) {
$lc++;
$filename = sprintf("%s/Gpsb%04d.wpt", $TARGETDIR, $lc);
open (OUTFILE, ">$filename") || die "Cannot open $filename for write!\n";
print OUTFILE $_;
close(OUTFILE);
}
exit;
Contributed to GPSBabel by Alex Mottram.
This format can...
read and write waypoints
This is the binary file format used by EasyGPS. This format is seemingly being phased out in favor of GPX in newer versions of EasyGPS, but this allows conversions to and from the old binary .loc format.
Information about and sketchy code to implement this file format were provided by Eric Cloninger.
This format can...
read and write tracks
read and write routes
FAI/IGC Data File -- Used by the international gliding community to record gliding flights. IGC files can be converted to and from tracks representing recorded flights, and routes representing task declarations in other formats.
Refer to Appendix 1 of http://www.fai.org:81/gliding/gnss/tech_spec_gnss.asp for the specification of the IGC data format.
A sample list of software applications that use data in IGC format can be found at http://www.fai.org:81/gliding/gnss/gnss_analysis_software.pdf
GPSBabel can be used to translate data in IGC format to and from various other formats.
Routes in other formats are used to represent IGC task declarations.
Tracks in other formats are used to represent IGC recorded flights.
IGC files generated by GPSBabel will NOT pass security validation tests since the data they contain cannot be proven to originate from an approved flight recorder. For most software applications that use IGC files this is not an issue but for competition scoring, record and badge claims the generated files will not be accepted as proof of a flight.
A track stored in another format (GPX for example) representing a recorded flight can be converted into an IGC file:
gpsbabel -i gpx -f mytrk.gpx -o igc -F myflight.igc
If multiple track segments are provided in the input file, the one with the most points will be used.
A route stored in another format representing a task declaration can be converted into an IGC file:
gpsbabel -i gpx -f myrte.gpx -o igc -F mytask.igc
A route and a track in other formats can be included into a single IGC file:
gpsbabel -i gpx -f mytrk.gpx -f myrte.gpx -o igc -F myflight.igc
A similar result can be obtained by downloading the track log and routes directly from a GPS device connected to a PC. For example to create an IGC file from data recorded in a Garmin GPS connected to the first serial port of a PC running Linux:
gpsbabel -t -r -i garmin -f /dev/ttyS0 -o igc -F myflight.igc
For Windows operating systems:
gpsbabel -t -r -i garmin -f com1 -o igc -F myflight.igc
A waypoint file in another format containing a waypoint whose short name is "PILOT" can be merged into an IGC file. The description field of the waypoint will be used for the pilot name in the IGC file header:
gpsbabel -i gpx -f mytrk.gpx -f myrte.gpx -f mywpt.gpx -o igc -F myflight.igc gpsbabel -w -t -r -i garmin -f /dev/ttyS0 -o igc -F myflight.igc
Some formats such as GPX allow routes, tracks and waypoints to exist in the same file and can be used to fully populate an IGC file:
gpsbabel -i gpx -f myall.gpx -o igc -F myflight.igc
Data in an IGC file can be converted into other formats. For example to generate OziExplorer files containing tracks representing the recorded flight (myozi.plt) and routes representing declared tasks (myozi.rte):
gpsbabel -i igc -f myflight.igc -o ozi -F myozi
Or to GPX format:
gpsbabel -i igc -f myflight.igc -o gpx -F myflight.gpx
Header information from the IGC file will be written to the description field of the track(s).
If both pressure altitude and GNSS altitude are recorded in the IGC file, two tracks will be written to the new track file, representing the two altitude tracks. The latitude, longitude and timestamps in the tracks will be identical.
A route stored in another format can be merged with an existing IGC file that has no task declaration, to generate a new IGC file with a task declaration:
gpsbabel -i igc -f myflight.igc -i gpx -f myrte.gpx -o igc -F mynew.igc
A two dimensional (lat/lon) track recorded during a flight by a GPS receiver can be merged with a one dimensional (altitude) track recorded during the same flight by a barograph instrument. The result is a three dimensional IGC file representing the flight:
gpsbabel -i gpx -f baro.gpx -i igc -f my2D.igc -o igc -F my3D.igc
The same can be acheived by downloading directly from a barograph instrument supported by GPSBabel. For example with a Brauniger IQ Comp GPS variometer:
gpsbabel -i baroiq -f /dev/ttyS0 -i igc -f my2D.igc -o igc,timeadj=auto -F my3D.igc
or:
gpsbabel -i baroiq -f com1 -i igc -f my2D.igc -o igc,timeadj=auto -F my3D.igc
(Documentation contributed by Chris Jones, Aug 2004)
(integer sec or 'auto') Barograph to GPS time diff.
Sometimes there is a discrepancy between the internal clock in the barograph instrument and GPS time which can result in the altitude and ground positions not correlating correctly. This can be corrected manually by passing the time difference in seconds between the two time domains through the "timeadj" parameter. This can be any positive or negative integer:
gpsbabel -i gpx -f baro.gpx -i igc -f my2D.igc -o igc,timeadj=27 -F my3D.igc
GPSBabel can also attempt to deduce the time difference automatically. This is done by comparing the time that it thinks that you landed on the GPS track and the barograph and adjusting accordingly:
gpsbabel -i gpx -f baro.gpx -i igc -f my2D.igc -o igc,timeadj=auto -F my3D.igc
This format can...
write waypoints
write tracks
write routes
This is a write-only format used to feed waypoints, tracks, and routes into Franson Technolgies' GpsGate simulator.
To use these files in GpsGate, select 'Simulator' and then "File->Open".
Default speed for waypoints (knots/hr).
This option specifies the speed of the simulation in knots.
Split input into separate files.
When this option is specified, GPSBabel will split split the output into multiple files using the output filename as a base. For example, if you specify an output file of 'mytrip',
| mytrip-waypoints.gpssim - will contain the waypoints. |
| mytrip-track0000.gpssim - will contain the first track. |
| mytrip-track0001.gpssim - will contain the second track. |
| ... and so on. |
| mytrip-route0000.gpssim - will contain the first route. |
| mytrip-route0001.gpssim - will contain the seconds route. |
| ... and so on. |
Valid values for this option are 0 (off) and 1 (on). The default is '0'.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This was a requested CSV format, *not* the proprietary binary format used by Fugawi. Like any other CSV format, GPSBabel cannot read tracks in this format, but converting a track into it and then importing as track in Fugawi works.
It is known to work with Fugawi V3.1.4.635. When importing/exporting waypoints, one has to specify the order of fields as follows (names of fields may depend on the language used by Fugawi):
| - Name |
| - Comment |
| - Description |
| - Latidude |
| - Longitude |
| - Altitude (metres) |
| - Date (yyyymmdd/yymmdd) |
| - Time of day (hhmmss) |
When importing tracks, use "[ignore]" instead of "Name", "Comment" and "Description".
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This is a very simple format that is most useful for exporting data from a Garmin301 to other programs for analysis. It's a simple comma delimited format that includes the timestamp, 3D position information and heart rate so you can pull it into a spreadsheet or graphing program.
This format can...
read and write tracks
This is the XML format used by the Garmin Logbook product that ships with Forerunner and Foretrex. http://www.garmin.com
This format can...
read and write waypoints
read and write tracks
read and write routes
Support for the "Garmin GPS Database" format used by default in MapSource versions since release 6.0. By default GPSBabel creates gdb files of version 2. Version 2 is used in Mapsource 6.3 and 6.5.
Garmin GPS database is an undocumented file format. The basic info for this module came from the existing MapSource conversion code.
Default category on output (1..16).
This option specifies the default category for gdb output. It should be a number from 1 to 16.
Version of gdb file to generate (1,2).
This option specifies the data format version for the output file. Version 2 is the default. Currently, the only other valid value for this option is 1.
This format can...
read and write waypoints
read and write tracks
read and write routes
This format supports the Garmin Mapsource™ product family.
This format is based on significant reverse-engineering and guesswork. GPSBabel's output appears to be compatible with the various versions of MapSource. Icon mapping is attempted between different MapSource versions. Altitude is supported, but proximity and depth are not.
Naming files *.mps will allow file->open in Mapsource to find the files more easily.
Versions 3, 4, and 5 of the Mapsource data format are handled automatically on input. By default the output is version 5. (Until 3/2004, it was version 3, but since Mapsource updates are free, the convenience of having modern icon sets outweighs the backward compatibility concern. Users of other versions can either upgrade or specify the switches to get output in a compatible format.) Waypoints, routes, and tracklogs are all handled, but map sets are ignored.
Information on the Garmin Mapsource format was provided by Ian Cowley and Mark Bradley. The code was implemented by Robert Lipe and Mark Bradley.
Length of generated shortnames.
This option specifies the length of generated short names on output. The default is 10 characters.
Allow whitespace synth. shortnames.
This option specifies whether to allow whitespace (space, tab, etc.) in generated short names on output. The default is to not allow whitespace.
Version of mapsource file to generate (3,4,5).
This option specifies the format version for the output file. The default is version 5, as noted above. Supported versions are 3, 4, and 5.
Merge output with existing file.
This option causes the output to be merged with a pre-existing output file. This allows MapSource sections that aren't handled by GPSBabel (e.g. map sets) to be preserved.
Use depth values on output (default is ignore).
This option causes GPSBabel to write depth values for waypoints. Most input formats do not support depth values, so the default is to not write them.
This format can...
read and write waypoints
read and write tracks
read and write routes
This is a textual format that contains nearly all of the information contained in the MapSource main format, GDB. This format also contains some computed values such as distances between routepoints and trackpoints, speed, and course (heading).
The main goal of garmin_txt is to make aviation data more available. Because MapSource supports only the export, GPSBabel gives you the possibility to bring aviation data into MapSource.
During the export with MapSource, some fields are written using local settings of MapSource and Windows. These include grid format, gps datum, distance and temperature units, and the representation of date and time fields. GPSBabel tries to read all items automatically. Problems with date and time format can be solved with the 'date' and 'time' options.
Example 3.1. Command showing garmin_txt output with all options
gpsbabel -i garmin_txt,date="MM/DD/YYYY",time="hh:mm:ss xx" -f in.txt -o garmin_txt,date="DD.MM.YYYY",datum="WGS 72",dist=m,prec=6,temp=c,time="HH:mm:ss",utc=+2 -F out.txt
Read/Write date format (i.e. yyyy/mm/dd).
This option specifies the input and output format for the date. The format is written similarly to those in Windows. An example format is "YYYY/MM/DD".
GPS datum (def. WGS 84).
This option specifies the datum to be used on output. Valid values for this option are listed in Appendix A, Supported Datums.
Distance unit [m=metric, s=statute].
This option specifies the unit to be used when outputting distance values. Valid values are M for metric (m/km/kph) or S for statute (ft/mi/mph).
Precision of coordinates.
This option specifies the precision to be used when writing coordinate values. Precision is the number of digits after the decimal point. The default precision is 3.
Temperature unit [c=Celsius, f=Fahrenheit].
This option specifies the unit to be used when writing temperature values. Valid values are C for Celsius or F for Fahrenheit.
Read/Write time format (i.e. HH:mm:ss xx).
This option specifies the input and output format for the time. The format is written similarly to those in Windows. An example format is "hh:mm:ss xx".
This format can...
read and write waypoints
read and write tracks
read and write routes
Garmin documents only PCX5, an older format limited to the lame NMEA six-character waypoint names that's treated as a second-class citizien in current versions of MapSource. In Mapsource, use file->import to read these files. If you name the files *.wpt, Mapsource will find them easier.
In general, you should prefer the "mapsource" file format to this one.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
The Garmin POI loader loads custom points of interest into certain models of Garmin GPS receivers. (As of this writing, only the models introduced in 2005 and later are supported. See Garmin's site for more info.) This is the format readable that that program.
This format can...
read and write waypoints
read and write tracks
read and write routes
GPSBabel supports a wide variety of Garmin hardware via serial on most operating systems and USB on Windows, Linux, and OS X.
For serial models, be sure the GPS is set for "Garmin mode" in setup and that nothing else (PDA hotsync programs, gpsd, getty, pppd, etc.) is using the serial port.
Supported models on USB include
| Edge 205 | Foretrex 201 | GPSMAP 60CS | Nuvi 350[1] | StreetPilot 7500 |
| Edge 305 | Foretrex 301 | GPSMAP 60CSX | Nuvi 360[1] | StreetPilot c310 |
| eTrex Legend C | GPSMAP 195 | GPSMAP 60CX | Quest | StreetPilot c320 |
| eTrex LegendCX | GPSMAP 276C | GPSMAP 76C | Quest II | StreetPilot c330 |
| eTrex Venture C | GPSMAP 295 | GPSMAP 76CS | StreetPilot 2610 | StreetPilot c340 |
| eTrex Venture CX | GPSMAP 296C | GPSMAP 76CSX | StreetPilot 2620 | StreetPilot c510[1] |
| eTrex VistaC | GPSMAP 378 | GPSMAP 76CX | StreetPilot 2650 | StreetPilot c530[1] |
| eTrex Vista CX | GPSMAP 396 | GPSMAP 96 | StreetPilot 2720 | StreetPilot c550[1] |
| Forerunner 205 | GPSMAP 478 | GPSMAP 96C | StreetPilot 2730 | StreetPilot i2 |
| Forerunner 301 | GPSMAP 496 | Nuvi 300[1] | StreetPilot 2820 | StreetPilot i3 |
| Forerunner 305 | GPSMAP 60C | Nuvi 310[1] | StreetPilot 7200 | StreetPilot i5 |
and most serial units including:
| eMap | eTrex Vista | Geko 301 | GPS III | StreetPilot III |
| eTrex Camo | eTrex Yellow | GPS 12CX | GPS III+ | StreetPilot III+ |
| eTrex Legend | Forerunner 201 | GPS 12Map | GPS II | |
| eTrex Summit | Foretrex 201 | GPS 12 | GPS II+ | |
| eTrex Venture | Geko 201 | GPS 12XL | GPS V |
None of the GPSBabel developers has access to every model on that list, but we've received reports of success and/or have reasonable expectations that the above models work. If you succeed with a model that is not on that list, please send a message to the gpsbabel-misc mailing list with the details so that we may add it.
Not every feature on every model is supported. For example, while we do extract data such as heart rate and temperature from tracks on the sporting models like Edge and Forerunner, GPSBabel is not a fitness program at its core and does not support features like courses or calorie/fitness zone data.
To communicate with a unit serially, use the name of that serial port such as "COM1" or "/dev/cu.serial".
To communicate via USB use "usb:" as the filename on all OSes. Thus, to read the waypoints from a Garmin USB unit and write them to a GPX file:
gpsbabel -i garmin -f usb: -o gpx -F blah.gpx
If you have multiple units attached via USB, you may provide a unit number, with zero being the implied default. So if you have three USB models on your system, they can be addressed as "usb:0", "usb:1", and "usb:2". To get a list of recognized devices, specifiy a negative number such as:
gpsbabel -i garmin -f usb:-1
When reporting problems with the Garmin format, be sure to include the full unit model, firmware version, and be prepared to offer debugging dumps by adding "-D9" to the command line, like:
gpsbabel -D9 -i garmin -f usb: -o gpx -F blah.gpx
Custom icons are supported on units that support that. Neither GPSBabel nor your firmware know what is associated with any given slot number. They don't know that the picture you placed in the first slot is a happy face, they only know they're in the lowest numbered slot. GPSBabel names the them consistently with Mapsource, so they are named 'Custom 0' through 'Custom 511'.
For models where the connection on the GPS is a serial interface, be sure the GPS is set for "Garmin mode" in setup and that nothing else (PDA hotsync programs, gpsd, getty, pppd, etc.) is using the serial port.
For models connected via USB, we recommend use of the 'usb:' filename. For this to work on Windows, you must install the Garmin driver. For Linux, this will fail if have the garmin_gps kernel module loaded. See the Operating System Notes for details.
Length of generated shortnames.
This option overrides the internal logic to figure out how many characters an addressed Garmin GPS will support when using the '-s' smartname option. This should be necessary only if you have a receiver type that GPSBabel doesn't know about or if you want to "dumb down" one unit to match another, such as wanting waypoint names in a StreetPilot 2720 (which supports 20 character names) to exactly match those in a 60CS (which supports 10).
Allow whitespace synth. shortnames.
This options controls whether spaces are allowed in generated smart names when using the '-s' option.
Default icon name.
This option specifies the icon or waypoint type to write for each waypoint on output.
If this option is specified, its value will be used for all waypoints, not just those that do not already have descriptions. That is, this option overrides any icon description that might be in the input file.
Value specified may be a number from the Garmin Protocol Spec or a name as described in the Appendix B, Garmin Icons.
This option has no effect on input.
Return current position as a waypoint.
This options gets the current longtitude and latitude from the attached GPS device and returns it as a single waypoint for further processing. For example, to return the current position from a USB Garmin to a KML file:
gpsbabel -i garmin,get_posn -f usb: -o kml -F myposition.kml
Command unit to power itself down.
This command forces an immediate powerdown of the addressed Garmin receiver. It is ignored on hardware that does not support this command. Obviously, further processing once you have sent a "power off" command to a unit that supports it is rather futile, so place this option carefully in your command.
gpsbabel -o garmin,power_off -F /dev/ttyS0
This format can...
write tracks
Garmin Training Center is the successor to Garmin' Logbook program for their workout units. It is a free upgrade.
This format is somewhat underachieving in GPSBabel. It is a write-only format; we never read it. The bigger problem, however, is a fundamental impedance mismatch between this format and most of what we support. GPSBabel fundamentally deals in waypoints, tracks, and routes. While we do record things like heart rate and temperature when we know it, the fundamentals of Training Center are different - it deals in concepts like laps and calories which are rather alien to GPSBabel and most of the formats we support. As such, while we can describe the tracks pretty accurately, things like calories and heart zone tracking are not supported.
This format can...
read and write waypoints
This format supports the Geocaching.com/EasyGPS ".loc" format. This format was created specifically for Geocaching.com and is not the same as the standard EasyGPS .loc format. See the EasyGPS or GPX formats for more general EasyGPS support.
This is a simple XML-based format containing only very basic information about geocaches. If you can use the GPX format instead, you should consider doing so as it is a much richer format.
Default icon name.
This option specifies the icon or waypoint type to write for each waypoint on output.
If this option is specified, its value will be used for all waypoints, not just those that do not already have descriptions. That is, this option overrides any icon description that might be in the input file.
There is no list of valid values for this option.
This option has no effect on input.
This format can...
read and write waypoints
This is the GeocachingDB by DougsBrat. It works with v2 and v3 of this program. See vip.hyperusa.com
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Input support for the GEOnet Names Server (GNS) country file structure. Export to this format is not possible, as this format has too many fields that we never get populated by any other format.
This format can...
read and write waypoints
Geoniche is a Palm/OS application oriented for the off-road user. This module was contributed by Rick Richardson. See nwlink.com
Database name (filename).
This option specifies the database name for the output file. This name is not the same thing as the file name on your computer; this is the name that appears in the file browser on your handheld.
This format can...
read and write waypoints
read and write tracks
read and write routes
KML, the Keyhole Markup Language, is used by Keyhole and Google Earth. There are features in this file format that GPSBabel doesn't support - such as camera views - but waypoints, tracks, and routes work well.
Google Earth also uses GPSBabel internally for receiver communications and several file format imports and exports.
Export linestrings for tracks and routes.
When this option is nonzero, GPSBabel draws lines between points in
tracks and routes. The default value for this option is 1, which causes
lines to be drawn by default. To disable line-drawing, specify
lines=0.
Export placemarks for tracks and routes.
When this option is nonzero, GPSBabel draws placemarks for tracks and routes.
The default value for this option is 1, which causes placemarks to be drawn.
To disable drawing of placemarks, specify points=0.
Width of lines, in pixels.
This option specifies the width of the drawn lines in pixels. The default value is six pixels.
Line color, specified in hex AABBGGRR.
This option specifies the line color as a hexadecimal number in AABBGGRR format, where A is alpha, B is blue, G is green, and R is red.
Altitudes are absolute and not clamped to ground.
When this option is nonzero, altitudes are allowed to float above or below
the ground surface. By default, this option is zero so that altitudes are
clamped to the ground. Specify floating=1 to allow them to
float.
This option is more useful to pilots than to hikers.
Draw extrusion line from trackpoint to ground.
This option is a boolean flag to specicy whether Google Earth should draw lines from trackpoints to the ground. It defaults to '0', which means no extrusion lines are drawn. The option of '1' is, of course, most useful for points that aren't actually on the ground such as those be captured from planes.
Include extended data for trackpoints (default = 1).
This is a boolean flag that controls whether GPSBabel writes extensive data for each trackpoint generated. By default computed speed, timestamps, and so on are written with the default of '1' for this option. If you are writing large tracks and do not value this information, you can reduce the size of the generated file substantially by turning this flag off by setting it to '0'.
Units used when writing comments ('s'tatute or 'm'etric).
Units is a simple option. Specify 's' for "statute" (miles, feet, and other things that don't sensibly convert to each other, but are craved by Americans) or 'm' for "metric".
Display labels on track and routepoints (default = 1).
When this option is zero, no labels are added for track and route points. This option defaults to one, so labels are added by default.
This format can...
read tracks
This format is designed to read the XML emitted when you tack "&output=js" onto the end of a Google Maps route URL (use the "link to this page" option to get a usable URL.) This allows you to plan a route using Google Maps, then download it and use it in your own mapping program or GPS receiver. To get a file suitable for use with GPSBabel, plan your route as usual with Google Maps. Once you've got it the way you want it, click the "Link to this page" link in the upper right-hand corner of the Google Maps page. Then, edit the URL that appears in your address bar by adding "&output=js" (without the quotes) onto the end. Hit enter, and the resulting page will be mostly empty. It doesn't look like much, but it contains exactly what GPSBabel needs. Save it to disk using whatever menu option your web browser provides.
Note that if you are using Microsoft Internet Explorer, you should make sure to save the web page as "Web Page, HTML Only". If you save it as "Web Page, Complete", it will be reformatted into a non-XHTML format that GPSBabel cannot read.
If you use a Unix-compatible operating system, this shell script might be useful:
#!/bin/sh FROM="233 S. Upper Wacker Dr, Chicago, IL" TO="1060 W. Addison St, Chicago, IL" wget -O - "http://maps.google.com/maps?q=$FROM to $TO&output=js" \ 2&>/dev/null >google_map.js gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx
This format can...
read and write waypoints
This is a Palm/OS file format for GPilotS. It was tested against version 6.2.
http://www.cru.fr/perso/cc/GPilotS/
Neither tracks nor routes are supported at this time.
This format can...
read and write waypoints
read and write tracks
read and write routes
Input and output support for waypoints, tracks and routes in the GPS TrackMaker binary format.
Code implemented by Gustavo Niemeyer.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
This format is used by GPSBabel itself as the input to the arc and polygon filters. See those filters for more information.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
GpsDrive way.txt file format. A space seperated format file. Tested against GpsDrive v 1.30 found at kraftvoll.at. Contributed by Alan Curry.
This format can...
read and write waypoints
This format is derived from the xcsv format, so it has all of the same options as that format.
Format used by GpsDrive to save tracks. Like GPSDRI