GPS plasmoid

Having recently acquired a bluetooth GPS receiver for as little as 20 €, and just having switched to KDE 4, i tried to combine those two, and write a little plasmoid to show the current position on the desktop.

And that is basically everything to say, enjoy the little applet.


Make sure gpsd is installed and set up properly. Also make sure the python bindings are installed.
In Ubuntu you would need to:

sudo apt-get install gpsd python-gps
sudo dpkg-reconfigure gpsd
sudo apt-get install python-plasma python-dev

After those are installed, you can proceed to install the plasmoid with plasmapkg -i.

Problems and TODOs

This is all rather dirty and bloated. The correct way to do it would probably be to write a data engine for plasma, which would provide the positional data. Maybe someone will do it, especially if Marble will one day be able to support overlays integrate GeoClue or something similar.

Right now the data travels from the GPS device to the PC in the form of NMEA sentences, gets then converted into gpsd’s own format, python-gps connects to gpsd over TCP port 2947, interprets the gpsd output, hands it over to the applet, which reformats the data yet again. For something so useless that just wastes too many CPU cycles. Interpreting GPS data entirely in python is not hard, but still a bit harder than with gpsd, especially if one wants to cover a lot of GPS devices. Don’t get me wrong, gpsd does its job quite well, it is just a bit overkill for this task.

Another improvement would be readable coordinates. Something like “10 km northwest of Zürich” or even “200 meters south of Sternen Oerlikon, Zürich” would really be much more useful.

Update February 2010: Version 0.16 now uses KDE’s geolocation data engine. This drops the (direct) dependency on gpsd, and allows for ip-based location – unfortunately i now can no longer get my gps to work with it, hoping for kubuntu lucid.

link to photos/screenshots/gps-plasmoid/gps-plasmoid012-zoom.jpg link to photos/screenshots/gps-plasmoid/gps-plasmoid012-zoom.png link to photos/screenshots/gps-plasmoid/gps-plasmoid012.png

filetype gps-plasmoid_0.16.plasmoid (5.85 kiB, 2010-02-13)
filetype gps-plasmoid_0.15.plasmoid (2.59 kiB, 2009-04-11)

This entry was posted in Computers and tagged , , . Bookmark the permalink.

4 Responses to GPS plasmoid

  1. Torsten Rahn says:

    > Maybe someone will do it, especially if Marble will one day
    > be able to support overlays.

    We already support ways to draw on top of Marble. You can either inherit from MarbleWidget and overwrite the customPaint function. Or you can write a render plugin for Marble. To draw in geo coordinates you can use the GeoPainter which allows you to do many of the things you can do with QPainter in geo coordinates.

  2. Andreas Goelzer says:

    thanks for the information, sorry if I have done marble wrong. It certainly is cool software, and reading the feature plan for 4.3, there are still a lot of more nice things planned.

  3. Ralph says:

    GPS-Plasmoid doesn’t draw good on KDE 4.2.95 (KDE 4.3 RC1).

    All Labels and Values are on top border, and the inner of plasmoid is empty!

  4. Ralph says:

    Works in KDE 4.2.96 (KDE 4.3 RC2) again!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>