From The World according to Vissie
Jump to navigation Jump to search

I will add some thoughts here on using my GPS on Linux and navigating and try and help the cominity by fixing or adding OpenStreetMap.

Talk to Garmin

I will try gpsbabel to download the old data on my Garmin 76S. Nice GPS! After 10 years, I still believe this is a great GPS. 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.

gpsbabel -i garmin -f /dev/ttyUSB0 -o kml -F gpsfile.kml

...pulls data from my handset and saves it in a Google Earth file in /home/roger/

Most formats supported by GPSBabel will make a 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 a Magellan Meridian GPS receiver into a gpx file, you might use a command like:

gpsbabel -D9 -t -r -w -i magellan -f com1: -o gpx -F backup.gpx

If you like seeing what is happening while you transversing data, do use the -D9 option to see debugging (and the data).


  1. The basic technique for mapping roads, footpaths, ferry crossings, ski routes, etc. is to just turn the GPS on and let it record tracklogs as you move. These --- provided they are in the WGS-84 datum, which is the default --- can be uploaded directly to OpenStreetmap and displayed on the editing map.
  2. The server understands standard GPX Version 1.0 and 1.1, except that the tag
  3. Check if your GPS unit has a "Snap to road" or "Lock on road" option, make sure that option is switched OFF, or you will end up merely recording a direct copy of the map loaded into the GPS unit, which is not only a copyright infringement (unless your map was downloaded or derived from OpenStreetmap), but is possibly going to be less accurate than the track you would otherwise record. On Garmin devices, it's on the first page of the map setup.
  4. Set the position-recording frequency to the highest possible, depending on the memory of your device, the foreseen length of your track, and the speed you're travelling at. If possible, set it to "every second". On the Garmin systems this is in the "Tracks", "Setup", "Resolution: Highest" menu.


GPSd interfaces to your GPS receiver, starts it up, and understands the NMEA and Sirf formats; you will likely need it to be running in order to use other programs (other programs do not understand NMEA or Sirf, but talk to gpsd to get the current position).

To make tracks, use of the following:

You can use the gpsd to just dump the data that comes in from the GPS, like this:

echo rw | nc localhost 2947 > CAR-Stockholm-Linköping.dump


echo "?WATCH={\"nmea\":true};" | nc localhost 2947 > new.dump

for gpsd newer than version 2.90. This is very lite and technical, but it's almost completely foolproof. I've got a script that will convert this dump to a GPX, alas only for gpsd versions less than 2.29. The Gpsd dump can also be converted with gpsbabel. You can use the filters within gpsbabel to remove points close to each other, and unreliable points.

gpsbabel -i nmea -f gpsd.dump -o gpx -F gpsd.gpx


Gpxlogger needs a running Gpsd in your system, but it saves you from running gpsbabel through your data, as it writes .gpx files directly. If you just want a GPX log to upload it to OSM, gpxlogger is the best option.

Keep in mind that the "output file" option may be broken, so please redirect the standard output to a file:

gpxlogger a.gpx > b.gpx

Your trace will be in either "a.gpx" or "b.gpx", depending on your gpxlogger version.

In Debian, gpxlogger is part of the "gpsd-clients" package. In Mandriva, "urpmi gpsd-clients" works.

Edit OSM maps data

JOSM itself can be used to record logs: the surveyor plugin (with the help from the livegps plugin) allows to add information to the current position.

GPS Drive

I followed a combination of these 2 how-to's

oDroid and Android

GlobalSat BU-353-S4 GPS receiver

From memory, I did the following steps.

This is the procedure:
1. Download and install SiRF demo software on a Windows box (
2. Connect the GPS mouse to your PC
3. Start the SiRF software
4. Connect the software to your GPS mouse
5. Goto Action > Switch to SiRF protocol
6. Goto Action > Switch to NMEA protocol
7. You get a NMEA setup window, change the baudrate to 9600 ( I set myne to 57600)
8. Synchronize Protocol & Baud Rate
Plug the GPS into Android. Open terminal
dmesg, check the device. If no USB port gets assigned, load the driver.
insmod /system/lib/modules/pl2303.ko -> ok no error
dmesg, find the port name, /dev/USB0
cat /dev/ttyUSB0
If no output, change the baud rate
Make sure you have SureUser installed on Android
Make sure you have BusyBox installed on Android
sudo stty -F /dev/ttyUSB0 ispeed 9600
cat /dev/ttyUSB0
If you see output, then things work. To make this permanent:
mount -o remount, rw /
And in file '/system/init.odroidc2.rc' you can insert one line to make pl2303.ko autostart:
   chown media system /sys/class/amhdmitx/amhdmitx0/aud_ch                  
   chmod 0664 /sys/class/amhdmitx/amhdmitx0/aud_ch                          
   insmod  /system/lib/modules/aml_thermal.ko                               
   insmod  /system/lib/modules/pl2303.ko  
/system/build.prop with those values:
And in /system/ueventd.odroidc2.rc:
/dev/ttyACM*   0666    gps             gps

Reboot, all worked NICELY for me.