The dinopolis gpstool package is an open source (LGPL) Java GPS application. It consists of different modules that may be used as a programmer's framework or as an application. The main application is GPSylon. A smaller command line tool (demonstration of the gpsinput library) is named GPSTool. The library that is used to communicate with the gps device can be used independently and is provided as a separate jar file (since version 0.5).
2006/10/23: New Release 0.5.2: Serial communication with gps devices fixed - no installation of java serial libraries needed. Fixed some other bugs and added export of tracks in gpx format.
2006/02/10: Minor bug fix on loading gpx tracks.
2006/02/01: Giving Google Ads a try.
2006/02/01: Finally, separated the gpsinput library from the rest, redesign of homepage (css'ed it). Version 0.5 released. No new features, just a little code cleanup.
2003/05/12: As the name GPSMap is already used by several other projects/products, the main
application is renamed to GPSylon.
Short Description of GPSylon
GPSylon is able to show maps downloaded from the expedia map servers. It may connect to a gps device and track your position on the maps. At the moment, it is able to read gpsdata in the NMEA standard from a serial gps device, a file or a gps daemon across a network (available at the gpsd project page).
The main feature is the display of various maps. GPSylon allows the user to navigate around like in a digital atlas. It shows maps of different scales, so missing maps of one scale do not result in a black screen, but show the next larger scale. See the screenshot section for an image.
It allows the download of a single map or for a given location or for multiple maps in a given rectangular area from mapblast or expedia map servers. In the download mouse mode the user may choose a single map or by dragging a rectangle with the mouse, the user may choose to download maps for a larger area. This functionality allows the user to download maps in a given scale for a larger area. Please only download maps you need and be careful not to download thousands of maps, as the map providers will discontinue their service when it is misused!
It uses the open source library openmap for various cartographic things.
FeaturesThe following features are implemented.
- Display different maps from mapblast or expedia server (also for maps of different scale).
- Display current position (gps position).
- Read gps data from serial device, file, or gpsd (daemon).
- Uses the following NMEA sentences: GLL, HDG, RMC, GGA, GSV, DBT, VTG, HTD.
- Display a track from gps data.
- Save the track.
- Load a track created from GPSylon or from gpsdrive.
- Import maps from gpsdrive.
- Download a map for a given position.
- Download maps for an area.
- Measure distance (ruler).
- Read and display shape files (very basic, not well tested!).
- display graticule lines
- window to display the raw nmea data
- Location Marker support: (creating markers, load markers from files (comma or space separated (name, latitude, longitude [,category]) - in that order!)), export markers to csv files, icons for categories, import geonet data (available from http://126.96.36.199/gns/html/index.html)
- Database support for Location Markers - selection of categories to
Different databases are supported (derby and hsqldb (both pure java, zero configuration), mysql and postgresql) - the database and all tables are created automatically
- Level Of Detail: depending on the chosen scale, not all location markers are displayed. The level of detail is increased when the user zooms in or chooses to override the level of detail. This behaviour might be tricky, when the user creates a location marker in a category that does not show due to its higher level of detail. So the user may not see the newly created marker.
- Search for location markers and set the center of the map to a search result. This is extremely useful in combination with the geonet data. So, after importing the geonet data, one is able to search for very small villages or other points of interest. When using mysql or postgresql as a database, the lookup for names of location markers is very fast, the (default) hsql database is about 5 to 10 times slower (but also works perfectly, just slower :-). So if one or more geonet files should be imported, I recommend mysql or postgresql (see in the installation section for configuration details).
Screenshots can be found here.
Supported GPS Devices
In general, all gps devices that support NMEA communication should work. Garmin protocol support is built in.
There were reports of the following devices to work with GPSylon:
- Garmin Etrex Summit/Legend (NMEA/garmin modes) tested by myself)
- Garmin eMap (NMEA/garmin modes) (reported by Thomas Müller))
- Trimble Lassen SK8 (NMEA mode) (reported by Didier Donsez)
- Garmin 35 (NMEA mode) (reported by Antonio)
- Conexant '99 embedded module (NMEA mode) (reported by Antonio)
- LeadTek Gps-9543 embedded module (NMEA mode) (reported by Antonio)
- Garmin Geko 201 (garmin mode) (reported by Frank Wilhelm)
- GlobalSat Bluetooth GPS BT-338 (tested by myself)
- Navilock NL-303P PDA-GPS-Receiver with Serial/USB converter (tested by Silverbullet)
Linux users please note: serial ports must be like /dev/ttySXX, as otherwise rxtx does not recognize the port. So for bluetooth or USB devices, a symlink is needed!
For bluetooth connection, I used the following commands under linux to
create a serial connection with bluetooth. First, find the id of your
bluetooth device. I used
hcitool for this:
hcitool scan output: Scanning ... 00:0B:5D:13:91:49 BEGRZ9001001 00:0D:B5:30:3C:0A BT-GPS-303C0AThe first id is my bluetooth dongle on the pc, the second is the gps device. So, with this id, we can create a virtual serial port using
rfcomm bind /dev/ttyS50 00:0D:B5:30:3C:0AAs rxtx does not allow
/dev/rfcomm0as serial device, I used
/dev/ttyS50(all ttys below 50 were already existent in my installation). A symlink from ttyS50 to rfcomm0 also works!
After this, I set some port parameter (I'm not sure, if this is really needed!):
stty -F/dev/ttyS50 -raw -onlcrNow, GPSTool or GPSylon can use the serial port
/dev/ttyS50for communication with the nmea bluetooth gps device.
After closing the application, one should release the bluetooth serial port:
rfcomm release /dev/ttyS50Please note, that all these commands (except for the application start) need to be run as root!
No installation of GPSylon itself is needed. Nevertheless, some dependencies exist:
- Java in Version 1.4 (or better) is needed. It can be obtained from Sun's Website. Development is currently done with version 1.5, but tests are done for version 1.4. Java version 1.3 will NOT work!
Starting from Gpsylon V0.5.2, NO installation of the Java serial libraries are needed anymore! The native libraries are shipped with Gpsylon and start scripts are provided (for Linux and Windows) for Gpsylon and Gpstool (ther command line application). So just unpack the archive, and run (or double click)
gpstool.cmd(for Windows) respectivly
gpstool.shfor Unix (Native Libraries for Linux, Sun Solaris and MacOSX are provided). As there is no Apple computer around for testing, I am not sure, if the unix scripts will work. Feedback is welcome!
Jan van Haarst reported that comfoolery can be used to forward the serial data to a network socket. GPSylon may connect to this socket when it is configured to use gpsd instead of the serial device.
Database for Location Markers
GPSylon is able to store and retrieve location markers from relational databases via JDBC. By default it uses the pure java open source Hypersonic DB (hsqldb). It has the advantage that no installation is needed and GPSylon creates a database on demand without any hassle.
As the geonet dataset is quite large (e.g. Austria 50 thousand entries, Germany 170 thousand entries), hsqldb seemed quite slow. So I gave it a try with mysql and it seems to be faster! Especially searching for location markers is faster by a factor 5 to 10! So I added a script that creates the table(s) needed (syntax differs slightly from the hsqldb syntax). The following steps are needed to use a mysql database instead of the built in hsqldb:
- Install MySQL :-)
Create the database: e.g. with the command
mysqladmin create gpsmap
- Start GPSylon and edit database settings in the preferences (Location Marker tab):
SQL Script to create the Database:
- quit GPSylon
- on the next start, GPSylon tries to access the new database, but cannot (as the tables are missing). It asks for administrators username/password (try "root" and empty password :-) so it can create the table(s). It will also add a user "sa" with no password for normal usage (access limited to gpsmap database).
- That should be it! From now on, all location markers are stored and retrieved from the MySQL database.
- JDBC Url: jdbc:postgresql://localhost/gpsmap
SQL Script to create the Database:
To start GPSylon, download the gpstool-archive, unpack it and call
java -jar gpssylon.jar
or if your environment is setup to handle jar-archives correctly, simply double click on the jar-archive (should work under windows). All needed classes are contained in the jar file. If you have the ant environment installed, call
For commandline arguments (everything may be configured in the
application as well!), call
java -jar gpsylon.jar --help
Mouse ModesGPSylon supports different mouse modes. Mouse modes may be added as plugins. At the moment, two mouse modes are available:
- Navigation Mode: click anywhere in the map to zoom in and center at the clicked position. If the shift-key is held, a click zooms out. More navigational functionality will be implemented soon (pan, ...)
- Download Mode: If the download mode is used, a window opens that displays some information about the map(s) to download. In the map window, a red rectangle (with crossed lines) shows the current location and size (size may not be exact and varies slightly from one internet map server to another). The user may change the location either by clicking in the map or by changing the coordinates in the download window. The coordinates may be entered in different formats (decimal, using the degree sign, etc.). The user may click and drag in the map to draw a rectangle. If the rectangle is larger that a single map, more than one rectangle is shown and the number of maps to download is shown in the download window. Please do not download maps excessively, as the companies that provide the maps do not like that and will stop their service if it is misused!
GPSylon supports plugins of various kinds. The plugin-jars
are used without the need to set the
CLASSPATH. All jars in the directories
[home]/.gpsylon/plugins and in the
plugins directory of the applicaton are used.
DownloadPlease download the latest distribution of GPSylon at the download page on sourceforge.
GPSylon is in beta-status. It runs quite stable, but many features are not implemented yet.
Articles about GPSylon
Elliotte Rusty Harold, the author of quite a few books about Java, mentioned GPSylon in his Cafe au Lait blog.
Other projects that use parts of the gpsinput/gpsylon code are:
Projects that are somehow related to this project:
- Gpsdrive was the main inspiration to write gpsylon.
- MapGeneration tries to create free vector data from NMEA streams - this was one of the goals gpsylon was written for!
- Maps4Free tries to do the same as a community project.
To Do List
- option to use always info from gpsdrive
- optionally draw rectangle for small scale maps that do not show (done (map manager plugin)): done
- download maps also larger than 1280x1024
- use repaint(int,int,int,int): mostly done
- are there GPS devices, that do not send RMC (for gps speed)??
- check for speed sent from gps (calculation of distance s=v*t) (tachometer)
- window showing NMEA data: done
- define route with mouse (like distant mouse mode)
- name route
- show table with available routes
- download maps for a given route in a given scale (and image size)
- follow a given route with gps
- different lists of waypoints: done, categories should do the job
- display different list of waypoints: done, categories should do it
- different symbols for waypoints: done, for a couple of categories, more to come
- store waypoints in database (hsqldb, mysql): done
- show major cities (CSV), use them as waypoints
- shape files: done (experimental)
location database (GNR)
- search for name in GNR (zipped files) (done, when gnr is imported)
- goto location (done)
- upload/download waypoints
- download Tracks: download is done
- upload Tracks
- pursuit mode: done, cdaller 2002/09/06
- as soon as manual navigation on screen, disable pursuit mode.
- different color for height or speed
- save gps tracks: done
- load gps tracks from gps device: done
- load gps tracks from file: done for own tracks, track of gpdsrive and gml tracks
- autoscale (set scale, depending on speed)
- define nodes (crossings) and arcs between nodes
- define type of arcs (highway, smaller road, bicycle path)
- export as GML
- import as GML
communication to other applications
- import/export maps, tracks, waypoints to gpsdrive, gpspoint (partly done)
- option to leave maps there or copy them to .gpsylon/maps directory
- import scanned maps
- download from different servers (expedia, mapblast, ...): done
- allow proxy authentication: done
- show table of maps (allow to delete, rename?, ...): partly done
- download an area of maps: done<
- need vector data for this!
- provide notifications for specific points (e.g. radar warning)
context menus (right mouse) / one button mouse (touchscreen) support????
- set position
- set destination
- set waypoint
- let each layer add menu for this
Compile Source Distribution
To compile the source distribution, the java make tool
from the apache project is needed. When correctly installed, a
should be enough to compile the
gives all ant-tasks.
Commandline tool GPSTool
GPSTool is a small command line application that demonstrates
the usage of the classes to read data from a gps device. The
main class is
and it may
be started using the provided gpstool-<version>.jar file
(execute in a command window
java -jar gpsylon-<version>.jar
- double click does not make
much sense, as it is a commandline application). Use "--help"
to see all commandline switches.
The following features are implemented in GPSTool:
- Show current position/altitude/speed/heading/info about satellites.
- Use NMEA or Garmin protocol.
- Download tracks, routes, and/or waypoints and print them in GPX format.
- Make screenshots from the display of the gps device. This is tested with the following models: Garmin eTrex Summit, eTrex Legend, eMap, Geko201, Streetpilot III (partly, needs more work - could not finish due to the device powered down after sending the 10th line of the image).
- Supprts Velocity templates to print tracks, routes, waypoints. These templates are easy to write. Use command line switch " --printdefaulttemplate" to show the gpx template. Other templates are provided in the auxiliary directory.
The source of the gpstool framework basically is licensed unter the Lesser Gnu Public License (LGPL). Some parts in the framework (e.g. the main application GPSylon) uses the Open Source library openmap. The OpenMap code is covered under the OpenMap license, which is a modified version of Sun's artistic license, so take care which modules you use and which license you have to respect.
The module that is responsible for reading gps data from a gps device in completely independent from the openmap library and may therefore be used under the LGPL license.