Archive for the ‘Software’ Category

Compiling and running MoNav

Sunday, August 15th, 2010
MoNav displaying a route in Karlsruhe

MoNav displaying a route in Karlsruhe

Today was a cold and rainy sunday, so I grabbed the occasion to play with various software which can make use of our collaboratively collected Openstreetmap data. One major gap in the toolchain is the lack of an end user friendly, working navigation software for mobile devices. There are several approaches, but none of them seems to be capable to replace an average user’s Garmin or TomTom device. Most are hard to compile, install, configure and use. And even if you manage to get it up and running, it is likely that you miss some features which you knew on your proprietary devices.

(more…)

Openstreetmap Routing News

Monday, July 19th, 2010
Beach Trip (openclipart.org, Gerald_G, public domain)

Beach Trip (openclipart.org, Gerald_G, public domain)

Most of you might already have heard about it, but anyway, here are two additions to the open source routing pool.

Vodaphone released most of the code of their discontinued Wayfinder navigation product into the world wild web. It seems the code needs maintenance before it is useful. Let’s see whether some enthusiasts are taking over.

The far more interesting announcement, though, has been posted right at the beginning of this year’s State of the Map conference. The Open Source Routing Machine (OSRM) is a »high-perfomance routing backend«. Check out the demo provided via Geofabrik. It’s just some C code. After compilation, you’ll get a handful of binaries, including the usual tool to convert OSM XML data into some binary file format and a web server which handles the requests and delivers the resulting route.

The speed is just amazing. However, after reading some of the source code, it currently appears to obey the following limitations. What I recall:

  • The result gets shipped in KML format. There’s nothing wrong with that, but I guess a GPX format was more versatile. I’m pretty sure, though, that KML has been chosen with reason.
  • AFAIR there’s only the web server’s output, no file output.
  • The code can only cope with a single tag per element, e.g. using the highway tag. It currently is not possible to select items by multiple tags, e.g. highway=track, tracktype=grade1.
  • Most options are hard coded, so it’s not possible to play with the options by editing a configuration file.

Anyway, it’s the initial release, and it looks very promising. I’m pretty curious how it will be accepted by the community, how it will develop over time and whether there will be collaboration or competition between OSRM and Routino.

First Offline Bike Routing on the N900 using Routino

Monday, June 14th, 2010
Biker pictogram (openclipart.org, public domain)

Biker pictogram (openclipart.org, public domain)

As a long time contributor of the openstreetmap project, I always dreamt about using our collaboratively collected data not only for creating maps, but also for (offline) routing. Actually, several routers exist, but none of them seemed to be really capable of doing offline bike routing.

Appearently I missed one bit. This weekend, I tried Andrew M. Bishop’s Routino. It’s a set of command line tools to convert osm XML files into a binary format and to use this data for routing. Additionally some helper applications are provided.

Surprisingly, the code cross-compiled for Maemo 5 without any further interaction (as advertised), just by typing make. Hmpf. Hmpf. Frankly, I was very exited.

The application is highly configurable via some XML files. Thus it supports routing using configurable profiles as well as shortest and quickest routes while supporting via points. It can output the route in various formats. I’ve converted a small set of osm data and tested the results for bike routes and was quite impressed.

I wrote some experimental code using PyGtk to make using it a bit more convenient on the N900:

Routino Frontend

Routino Frontend

It can get the start position from the location system of the N900. Unfortunately I struggled with DBus and was not successful yet getting the viewport coordinates from Mappero for convenient graphical destination selection, but I hope to get this working during the next days. Currently, the destination can be copied over using the clipboard.

Here’s a route calculated by Routino and loaded into Mappero:

Routino Route loaded into Mappero

Routino Route loaded into Mappero

It’s far from being convenient to use or user friendly. But for me a dream comes true: Offline bike routing on my mobile computer. Thanks Andrew, you made my weekend!

OS-Install-o-mania Parts 1, 2 and 3

Monday, May 31st, 2010
Unintentionally trashing the Vista installation on a Dell computer

Unintentionally trashing the Vista installation on a Dell computer

One decade back, I was installing operating systems quite often. Win 98 was broken every now and then, and Linux was developing very quickly.

Meanwhile I’m very reluctant in updating operating systems. It just takes too much time to set up the system, to reinstall all required applications and to do all the configuration work. Or the other way around: It’s just a waste of time.

However, there are circumstances where your machines need some healing hands.

#1: N900 Upgrade

This week, a much anticipated update for the Nokia N900 was finally released. I was eagerly waiting for it, as I hoped that it would erase »The Big Bug«. The update was advertised as an »over-the-air«-update, installable via a wireless network connection. Unfortunately, the device didn’t offer the update on my machine. After waiting for a couple of days, I got suspicious and searched the web for the reasons.

Obviously the device performs some checks first, and in case certain circumstances occur, it denies to offer the update. The reason might be that I enabled an additional repository and installed (only) a couple of extra software packages. Further, the N900’s operating system is not installed to the 32GB flash memory. Instead, it lives in some wee small extra partition of about 200MB. I’ve never understood why it is designed this way and why the space is that limited. Unfortunately, the Debian-like operating system stores each package in a folder in this small partition, further reducing its size.

So I ssh’ed into the phone and tried to install the update using apt-get. It told me that it wants to download about 100MB of packages and that there was not enough space left. I created a folder on the 32GB flash drive and symlinked to it. Now the update packages were downloaded and the update went fine – halfways. I saw some warnings during the update, and finally it stopped.

So I did it the hard – by reflashing the device. I downloaded the current firmware image and a GUI tool for the Mac. Unfortunately this tool failed to complete the flashing process so the device was bricked. I tried again using my Linux box and everything went fine now. As all personal data lives on the 32GB storage which was not touched by the flashing process, I just needed to reinstall some additional software packages (mainly those for mapping) and was back in business.

#2: Reinstalling Vista from a recovery CD

The backlight of the display on my Dell notebook was broken (it appeared as a defective contact, as the backlight switched off every now and then). I’ve a service contract and hoped they would replace it as soon as possbile (»next business day«). Surprisingly, there was some (bi-daily) mail exchange where they told me what to do – one bit of information per message.

First they asked me to install some BIOS and driver updates, though I wrote in my initial message that I’m running Linux on the machine and that everything looks like a hardware defect. I wanted to do them the favour and booted Vista from the (seldom used) NTFS partition. After downloading and installing the driver updates, Vista prefered to show a blue screen at each attempt to boot it. Doh.

Dell further asked me to run a diagnostics tool before booting the operating system. This led me nowhere, as the backlight of the display always switched off while the tool was running.

Next they offered to catch the device and to repair it off-site. The device would be unavailable for up to two weeks. Hey guys, there was a reason why I spent the extra bucks for the on-site service.

Finally, after almost two weeks, a technician dropped by and exchanged the display. Heck, I didn’t remember how bright the display once was :) .

I do not really rely on the Vista installation, but I boot it every now and then to compile and test some code of my own. Due to some file system errors, problems with KDE after upgrading Ubuntu, the broken Vista installation and the fact, that the 15 GB partition was too small for Vista (yes, Vista needs at least 10GB for its installation, 2GB for a swap and 2GB for a hibernation file), I decided to set up the complete machine anew.

I backed up my home directory and used the Kubuntu installation disk to repartition the hard drive.

The Vista installation went halfway straightforward thanks to the Dell recovery CD. But later on I got stuck as there was no driver installed for the wireless network adapter. I tried to install it from an additional CD that came with the device, but to no avail. I finally downloaded some drivers from the Dell page and got it working, but this still was a challenge as it was not obvious which file to download and install. This was surprising as I passed the service tag of the device to the online support system.

Finally Vista insisted to download and install plenty of huge updates. I read »Usability Engineering kompakt« meanwhile :) .

#3: Installing Kubuntu 10.04 LTS

This one was simple. Insert the CD, enter some data, select the right partitions for installation and let the installer alone for a couple of minutes. After booting the system, plug in the USB hard drive containing the backup of your home directory and copy the files back to the hard drive. Log in and feel comfortable.

Conclusion

It was good luck that it was a rainy sunday. I really hate those bread- and senseless installation orgies. I hope the machine will now run until it gets replaced.

Adieu KDE – peu à peu

Sunday, May 30th, 2010
Office utils (openclipart.org, public domain)

Office utils (openclipart.org, public domain)

I’ve been a KDE user for a very long time – actually since I use Linux on my machines. I remember the day when I wiped Win 95 and installed SuSE Linux (do not recall the version) back in 1998. I sat in front of the computer, staring at the KDE filemanager. And I thought: »And that’s the operating system better than Win?!?«. Meanwhile I know better, and KDE matured over the years. I helped with a bunch of applications, writing manuals, filing bug reports, and finally started to write my own code to get some tools I missed.

KDE 3.5 was a very usable and stable system, while KMail still is an excellent mail user agent.

However, the switch to KDE 4 was a major break, introducing lots of rewritten code and new design concepts. While I appreciated all the ongoing changes, I left my system untouched, still running KDE 3.5.

I upgraded as my distro was outdated and the repositories went offline. This way I got KDE 4.3. Well, it was running and ready to use, but there were lots of issues which did remind me of the days when struggling with Win 95.

One source of eternal joy is the mess around KDE PIM, Akonadi, Strigi, Nepomuk, Virtuoso-t and the like.

Virtuoso-t CPU usage, draining the battery

Virtuoso-t CPU usage, draining the battery

Kontact, the PIM application embedding mail, contacts, feeds and the like, started to rely on Akonadi, which in turn requires an SQL database server for operation. Unfortunately it didn’t work out of the box, and after following some docs on the net and trying out several meds to cure the problem, I finally gave up and decided that I will never run an SQL server just to manage some personal data. So I have to close the annoying Akonadi error message dialog each time I log in.

Akonadi error message after each login

Akonadi error message after each login

I understand the design concepts behind the PIM suite and am impressed of what the KDE community tries to achieve. But at first I need a working system where I can perform basic tasks. Further, I want to create backups just by copying the data of my home directory to another hard drive. I will not start to write specialized scripts which will backup and restore some additional data of a database server. If I wanted to, I’d install an Exchange server and enjoy the journey.

One of the cool things I always liked in KDE was the fish-protocol which allows you to edit files transparently directly on a server over an ssh connection. Unfortunately this was one of the features broken in KDE 4.3.

Meanwhile I upgraded my distro and got KDE 4.4. The fish protocol is operational again (which is great). But the problems with Akonadi remained. I still cannot access my contacts from within Kontact, as it complains about problems with the Akonadi server.

Impossible to access contacts

Impossible to access contacts

Additionally, it seems that there still is absolutely no possibility to sync any of the PIM data with my cell phone.

The file indexer continues to keep my CPU and notebook fans busy (hi nepomukservicestub). I saw it eating one of my cores completely, but also saw it at 70% CPU usage.

Nepomukservicestub easting 49% CPU

Nepomukservicestub easting 49% CPU

Dolphin, the file manager, also shows some severe bugs. Today I wanted to change the file permissions of an (admittedly huge) backup file available on an external USB hard drive. I rightclicked and chose to open the properties dialog. The result was a frozen file manager which I killed manually. After two further attempts I used the command line to set the file’s properties. In case you expect that all this fan blowing at least makes sense because you’ll easily find files afterwards, you might be wrong.

Nepomuk search failed

Nepomuk search failed

To me KDE 4 appears as an overloaded desktop environment with too many applications, too many features and too many bugs, which in turn has problems performing basic tasks like managing files, PIM data and doing some sync to a cell phone. I really appreciate the decision to turn the computer into a social desktop to manage one’s internet activity. But I wonder whether it was better to keep the rewrite of the desktop separate of the breaks and changes of the PIM applications. The propellerheads behind KDE were brave and decided that they better do it the hard way. KDE probably will be a cool desktop in a couple of years again.

But meanwhile I need a replacement, and less surprisingly I’m considering to give another desktop a try. Besides Gnome and Evolution, there are other window managers and PIM applications. If you’re a KDE switcher and want to share some experience, please drop me a line.

Mappers heading towards Wissembourg

Sunday, May 23rd, 2010
La Maison du Sel en Wissembourg

La Maison du Sel en Wissembourg

Finally the rainy days are over. The warm and sunny weather conditions allowed for the first mapping trip to Wissembourg by bike – the biking season finally has started.

I mapped a lot of details along the way. Some short breaks every now and then and finally a nice supper at the destination took time. Luckily »Deutsche Bahn« (a german railway company) provided public transport back home.

The location services of the N900 are pretty good, but there are also some weak points:

  • The N900 uses assisted GPS (AGPS) to get its position really quickly. If however no callular net is available, it needs ages (up to twenty minutes) to get a GPS fix. I’ve also seen such a behaviour on one of Garmin’s premium GPSrs, but only every now and then. The N900 does it each time it is outside the network of my provider. I guess the behaviour could by improved by saving an almanac to the device, but appearently the N900 doesn’t do it.
  • The first fixes the GPS subsystem delivers to the requesting application are sometimes really far (and I mean far) away from the actual position. This makes it difficult to check the trip’s length at home. I’ve never seen such a behaviour on the Garmins I used, and I consider this being a software bug.
  • Modern vehicles use screens with a vapour deposited metal layer. This hinders the GPS signals flowing into the vehicle. If the Garmin’s have a fix outside the vehicle, they are usually (but not always) capable to keep the fix after entering the car or train. The N900 today had difficulties, but as the WBT I also used today did not really do much better, I guess there were really bad GPS conditions in the train.
  • The big bug requires a second device which is more reliable for collecting tracklogs. Both Maep as well as Mapper loose their tracks in case you must hard reset the device.

Here’s how the tracklog recorded in the train looks like. Note that it should follow the rails precisely:

The device is an almost perfect gadget anyway. All I want to say is: If you reliably want to collect the tracklogs of your trips, just get an additional logger. The N900 is an exccellent general purpose device. It is not a specialized GPS receiver and logger.

Osmarender rules changed to render forest parcel names

Sunday, May 9th, 2010
Forest parcel name rendered in osmarender, zoom 17

Forest parcel name rendered in osmarender, zoom 17

At crossings of tracks in the woods, you often can find up to four name plates displaying the names of the adjacent wooden parcels. I usually placed a node tagged as place=locality and added the names. Of course this leads to a situation where the names will overlap each other, and after collecting some of those plates, it was desirable to draw the parcels as areas with the name rendered at the center, not as individual nodes at the vertices. I currently add a polygon tagged as landuse=forest.

While Mapnik renders the names of natural and landuse features in zoom levels 14 through 17, Osmarender only rendered them visibly at zoom level 17. It rendered natural names at zoom levels 16 and 15, but subsequently the caption was hidden by the rather huge surrounding wood polygon. landuse was missing in those levels.

I’ve thus adjusted the render rules so the names of natural and landuse features also get displayed at zoom levels 16 and 15. I hope this won’t mess up the map in densely populated areas. If so, please drop me a line and I’ll change the additional k="landuse" v="*" to something like k="landuse" v="forest|wood".

As soon as the changes are slurped by the tiles@home clients, I’ll start to convert the locality-nodes to something like amenity=nameplate or similar to finally clean up the map.

Mapping Hiking Routes

Saturday, May 1st, 2010
Hikingmap Route

Hikingmap Route

While curing some cold, I mapped a hiking route to make it appear on the Hiking and Bridlemap.
(more…)

LAC 2010 conference

Friday, April 30th, 2010
Audio Icon (openclipart.org, public domain)

Audio Icon (openclipart.org, public domain)

Though I’ll not attend, I’d like to advertise this year’s Linux Audio Conference, “the conference about Open Source Software for music and sound” which takes place from May 1-4 2010 in Utrecht, the Netherlands. Hopefully the programme wets your appetite.

Wiping the bugs in favour of new ones

Thursday, April 29th, 2010
Hürschkäfer (Lucanus Cervus)

Hürschkäfer (Lucanus Cervus)

Being a Linux user for about 12 years now, I’ve also used KDE since version 1. I also used version 2, and KDE 3 finally provided a comfortable user interface for a Linux driven computer.

However, I avoided to install version 4 due to the heavy changes to the underlying system. I needed to install KDE 4.3 anyway as soon as the lifetime of my operating system was over. And frankly, 4.3 still had some minor but rather annoying bugs. I don’t want to complain. I’m a member of the global open source developer’s village, and my very own code is far from being bug free.

Meanwhile KDE 4.4 is out, and Ubuntu 10.04 (aka Lucid Lynx) was released today. Operating system upgrades usually break some things, so I’m usually reluctant to install them. But today, I could not resist.

So I’m running a backup right now, and will run the upgrade immediately after it. The weekend will be a rainy one, so I’ll have some time to fix potential issues. Wish me luck :) .

Battery Lifetime when mapping with the N900

Tuesday, April 6th, 2010
Plane drawing curves on the sky

Plane drawing curves on the sky

Again I was mapping using the N900. I permanently had Mapper, osm2go, FM Radio (respectively an audio player) plus a text editor running. Additionally I took a couple of photos.

(more…)

Playing your favourite Flash Music via Jack and Firewire

Sunday, January 10th, 2010
Drumset (openclipart.org, public domain)

Drumset (openclipart.org, public domain)

The core of my home studio consist of a Notebook and a firewire mixing console. Unfortunately, Flash used my notebook speakers for audio output instead of the firewire device. There are several workaround setups to circumvent this, but most of them are at least a bit cumbersome.

Thorben Hohn fortunately wrote a library which provides an elegant solution. Here’s what to do:


mkdir libflashsupport-jack
cd libflashsupport-jack
git clone git://repo.or.cz/libflashsupport-jack.git
cd libflashsupport-jack
sh bootstrap.sh
make
make -n install
sudo make install

Restart firefox and listen to your favourite music video on Youtube (Zansa and Bimoya) via jackd – what a joy! All credits to Thorben for the excellent work.

Openstreetmap Data Types

Saturday, January 9th, 2010

osm_logo.png

The data of openstreetmap is stored in a relatively simple manner. Basically, we have three base datatypes:

  • Nodes are the most basic datatype and the only objects that actually contain geographical coordinates. A node may simply look like
    node id='12345' lat='48.9955' lon='8.3948'.
  • Ways are ambiguous. More or less, ways are just polygons, and can either describe a way or an area. Ways have no geoinformation itself, as they are relying on nodes:
    way id='23456' nd ref='12345' nd ref='12346'.
  • Relations have been introduced with API 0.5 and can be seen as data objects glueing together either nodes, ways, or both. Relations are used to model turn restrictions, routes, multipolygons and the like:
    relation id='34567' member type='node' ref='12345' role='' member type='way' ref='23456' role=''.
    The members of a relation can take a role to describe what they mean. In simple relations (like route releations) the role attribute often is left blank.

Simple plain text Tags are used to determine what kind of map feature a node, way or relation represents. A tag consists of a key-value-combination like amenity=bench, natural=water, highway=residential or route=ski. Mappers are invited to invent new tags whenever necessary. This freedom plays an important role concerning the success of the project.

Prior to API 0.5, we had Segments. A segment connected two nodes. First, tags have been applied directly to segments. Then, ways have been introduced which joined segments together. Since then, the tags have been applied to the ways instead of the segments. Segments caused some trouble (namely “unordered segments” for the old dogs) and have been abandoned during the introduction of API 0.5.

So nowadays we have nodes, ways, relations and tags. Easy, isn’t it? True for nodes, ways and tags. Not true for relations, though. Relations are difficult to create and edit, because they most often have no direct graphical representation in the editors. More or less they appear a bit flange-mounted on top of nodes and ways. Nevertheless they allow us to map things that otherwise would be difficult or impossible to model.

When software development keeps you busy during the X-mas break

Monday, January 4th, 2010
Buggy Golf (pics from openclipart.org, public domain)

Buggy Golf (pics from openclipart.org, public domain)

I do not operate a car of my own. Instead, I’m a customer of a local car sharing provider. For the X-mas family meeting, I rent a less than two years old car.

(more…)

Simple Sysexxer 0.3 released

Saturday, December 19th, 2009
Simple Sysexxer 0.3

Simple Sysexxer 0.3

I just uploaded Simple Sysexxer 0.3. See its dedicated page for details about download and usage.

The MIDI reception part has been rewritten to use the ALSA sequencer directly. Receiving (and sending) huge SysEx messages (greater than 256 bytes, ALSA’s buffer size) now should work reliably. At least it does with a Korg Z1 Synthesizer (168 531 bytes for the complete internal memory).

Hope you enjoy. Feedback is always welcome. Just drop me a line.

Where Linux sucks #10811¹

Monday, December 7th, 2009
Penguin (openclipart.org, public domain)

Penguin (openclipart.org, public domain)

According to my last posting, I wanted to record some audio on my Linux Box. If you don’t want to use a fully flavoured digital audio workstation or sequencer, you can for example use qarecord or timemachine. First I tried timemachine.
(more…)

Where Linux sucks #26685¹

Monday, December 7th, 2009
Penguin (openclipart.org, public domain)

Penguin (openclipart.org, public domain)

I’m using Linux for more than 10 years now, and it is my operating system of choice. There is plenty of cool software available, and any programming environment is right at my finger tips. Even on “The Desktop”, it is often much easier and more convenient to use than any other operating system.

However, there are still a lot of glitches which are capable of rendering the machine useless for average users.
(more…)

Sound Collection Tools for the Korg Z1 Synthesizer

Wednesday, November 25th, 2009
Korg Z1 Panel

Korg Z1 Panel

I’ve collected a lot of sounds for the Z1 from several web pages. All those sounds now need some sorting and rearrangement. After that, I’ll send them to the Z1, extract the best ones and refine them to my likings.

(more…)

OSM-Booth at OpenExpo, Karlsruhe

Sunday, November 15th, 2009
OSM-Booth at OpenExpo, Karlsruhe, Germany

OSM-Booth at OpenExpo, Karlsruhe, Germany

The OpenExpo just opened. Both OSM as well as KaLUG are manning a booth. As last year, there aren’t many visitors yet, but this will change until noon.

Switching from Linux to Windows

Friday, November 13th, 2009
Broken Windows (wikimedia commons, public domain)

Broken Windows

I run a dual boot machine, using both Linux and Windows operating systems. I rarely boot Windows but only use it once a semester or so to try out some application or to compile Gebabbel for my Windows users.
(more…)