Archive for the ‘Coding’ Category

Routino Frontend published

Sunday, June 27th, 2010
RoutinoFrontend

RoutinoFrontend

I’ve just released Routino Frontend to the world wild web. The current code needs manual installation. A proper installer will be created only in case I see there’s some interest in this application.

Routino Frontend will start the GPS subsystem and allow you to get the current GPS location as departure or destination. Additionally, up to three via points are accepted.

To get the coordinates for via or destination points, go to Mappero, point the map to the desired location, press the left uppermost on-screen button, choose »Show Position« and copy it to the device’s clipboard.

After a route is calculated, the resulting file will be placed in the documents folder of the device, ready to be loaded into Mappero or Maep.

The code is in its early stages and needs refactoring. Please note that the current frontend will invoke routino in blocking mode. As soon as you process a route, Routino Frontend will not return before it finished. In case you calculate a long route, this means that Routino will eat all your CPU, memory, swap memory and battery power until it has done its job (which means that you probably need to remove the battery to quit it).

If you are more familiar with Python (and especially its subprocess module) as I am and you can help to add a nice cancel button which reliably kills Routino please drop me a line.

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.

Waypointcatcher resurrected for Maemo 5

Monday, April 12th, 2010
Waypointcatcher on Maemo 5 (aka Fremantle)

Waypointcatcher on Maemo 5 (aka Fremantle)

As the location API has changed in Fremantle from libgpsbt to liblocation, the previously released version of waypointcatcher won’t do the job on the N900.

I’ve thus updated the python code, which despite its C&P nature just »works for me«. I’ll share the application on request, until I find the time to do the necessary cleanup and to offer a proper point and click installation link.

Its main purpose is to collect waypoints for openstreetmap, as Mapper does not record marks reliably ATM.

Simple Sysexxer: »Eat your own dogfood!«

Wednesday, February 3rd, 2010
Simple Sysexxer receiving data

Simple Sysexxer receiving data

During the last days and weeks, I missed some minor features in Simple Sysexxer, so guess what I was doing…

(more…)

JOSM Presets updated

Sunday, January 17th, 2010
JOSM Logo

JOSM Logo

I rearranged the presets in JOSM and am prepared for the usual bashing :) .

Tracks and paths have been reunified into one menu entry only, so the convenience menu shortcuts to the various types of tracks and paths are past. OTOH, I have introduced dedicated menu entries for combined foot and cycleways:

JOSM presets - cleanup and additions

JOSM presets - cleanup and additions

The types have been included as popup menus into the dialogs. Besides tracktypes and hiking scales, I also included mountainbike scales, while more special tags for mountain bikers can be used by including an existing set of externally maintained presets:

JOSM - Path Preset

JOSM - Path Preset

Obviously, the dialogs are completely overcrowded. We will not be able to stuff any and all tags that will develop in the future into JOSM. Be prepared that I will do some major cleanup work some day.

External Presets in JOSM

Sunday, January 17th, 2010
JOSM Logo

JOSM Logo

JOSM provides the capability to include presets from external sources. It is the perfect mechanism for a group of mappers to maintain a specialized set of presets. This way, »Special Interest« mappers like skiers, mountain bikers or seamen can feed menu entries they need directly into JOSM without polluting the default menu space of JOSM.

Some examples are available via JOSM’s wiki pages. There’s also a page how to create and use such presets.

Sorting Sound Files using Ruby

Wednesday, November 25th, 2009

ruby-2008.png

Consider you have 2,248 files in a directory, each containing one single sound program for your favourite Z1 synth. You need to load them into the synth individually, listen to them and to sort them in directories. Painful it would be.

Fortunately, all sounds are set to one of 18 predefined categories like guitar, synth hard, synth soft, piano, organ and the like. In the SysEx files, the category is coded into the 26. byte. So it was easy to sort the files into subdirectories using a couple of lines of Ruby code (sorry for the misformatting):



#! /usr/bin/ruby

require 'fileutils.rb'

def determineCategory( filename )
file = File.open( filename, "rb:binary" )
fileContents = file.read
category = fileContents[25] + 1
# puts filename, category
unless File.directory?(category.to_s)
Dir.mkdir( category.to_s )
end
FileUtils.mv( filename, category.to_s )
end

Dir.glob( '*.[Ss][Yy][Xx]' ) do |entry|
determineCategory entry
end

This language seems to be very powerful. Need to do more with it.

XP Days Germany ahead

Wednesday, November 25th, 2009
Meeting Point Symbol (openclipart.org, public domain)

Meeting Point Symbol (openclipart.org, public domain)

The XP Days are just a couple of hours ahead. I’m curious what people will attend and expect some illuminative talks. I hope it will be possible to blog directly from the conference, either using the notebook or the N810. I’ve also set up an “extra group” :) in our “company owned” messaging system in advance.

Though it is not for free it was too tempting to attend – it’s just a five minutes walk from our office, so there was no excuse :) .

ALSA Sequencer Interface for Simple Sysexxer

Monday, November 23rd, 2009
Simple Sysexxer Icon

Simple Sysexxer Icon

The last release of Simple Sysexxer used RtMidi for MIDI input. However, some weird things happend when I tried to receive data from my beloved Korg Z1 synth. Today I have rewritten the MIDI input thread using the ALSA sequencer API.

(more…)

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…)

Expense-Recorder released

Tuesday, October 13th, 2009
Expense Recorder

Expense Recorder

Admittedly, it’s just a modification of the Waypoint Catcher. For me it’s useful anyway :) .

Ruby on Rails on the Nokia N810 – sqlite lib needed

Thursday, September 17th, 2009

I’m currently playing with Ruby on Rails, just for my very own pleasure and joy. Admittedly, that’s only one half of the truth. Some ruby (respectively rails) knowledge will also help me during my “daytime job”. What I’d like to do for now is to develop some rails application for the Nokia N810.
(more…)

Subgroups in JOSM presets

Tuesday, September 15th, 2009

The presets in JOSM are built at runtime parsing an XML file. JOSM gets shipped with one default file which I usually maintain. Users beg for the inclusion of further features regularly, so meanwhile the menus as well as the dialogs are both densely populated. This makes JOSM hard to use on devices with smaller displays, like the popular Netbooks or internet tablets.
(more…)

Maintaining JOSM Presets

Wednesday, September 2nd, 2009
JOSM presets - Museum

JOSM presets - Museum

JOSM, an openstreetmap editor written in the Java programming language, provides some “presets” which allow the user to tag objects easily just by selecting it from a menu. This menu and the corresponding dialogs are all defined in a huge XML file, presets.xml. It allows to define menu entries, subgroups and finally dialogs with standard GUI controls such as checkboxes, comboboxes, line edits, labels, icons etc.

The aforementioned presets.xml is included in josm.jar, but JOSM even can load such presets over a networking connection (http). This makes it easy for users to create and use their very own presets, maybe for specialized use cases like event mapping, mapping ski pistes or nautical stuff.

On request, I have just added the tag “opening_hours” to various presets like shops, restaurants, museums and the like:

JOSM presets - Museum Dialog

JOSM presets - Museum Dialog

If you have further requests, do not hesitate to open a trac ticket. It’s even possible to do this as anonymous user, so there’s no excuse :) .

Simple Sysexxer 0.2 beta released

Friday, August 21st, 2009
Simple Sysexxer 0.2

Simple Sysexxer 0.2

I have just released Simple Sysexxer 0.2 beta. See its dedicated page on this blog for details about download and usage.

I need feedback how it works with various flavours of MIDI instruments. If you can share success stories, bug reports or even feature requests, please let me know.

Simple Sysexxer Source added to Sourceforge SVN

Tuesday, August 18th, 2009

I have just imported the current source code of Simple Sysexxer into Sourceforge’s SVN server. To grab your copy, just use the following command:
svn co https://sysexxer.svn.sourceforge.net/svnroot/sysexxer/

Additionally, sysexxer.sf.net now redirects to the Simple Sysexxer page on this blog.

Simple Sysexxer 0.2 Beta available

Monday, August 10th, 2009
Simple Sysexxer 0.2 Beta

Simple Sysexxer 0.2 Beta

I just sent out an electronic message to various people who hopefully won’t be able to detect any bugs :) . If you like to help with testing, please do not hesitate to drop me a line. If no major issues occur, I’m inclined to release it before the end of this week.

Details about it can be found at it’s dedicated page of this blog.

Adding Drag’n'Drop-Support to a QT4 application

Sunday, August 9th, 2009

While working on Simple Sysexxer, I wished to add drag’n'drop support to open files. Thanks to QT4 it was quite simple. The following code has basically been derived from the book C++ GUI Programming with Qt4 and slightly modified to fit into the existing code.
(more…)