XKCD GPS “Cyborg navigation” ported to Roadnav

July 13th, 2008

So as you probably know, I am a fan of the webcomic XKCD. Back in May, Randall posted a comic and a blag article about his idea of a dead reckoning type navigation system, which every couple of seconds it speaks the distance and the direction to your destination. I’ve been hanging out with the excellent people at #geohashing, and one of them suggested that I look at the “cyborg script” for use on my carputer. Well I thought, why not port it to C++ and stick it in Roadnav?

So I went ahead and did the implementation in my semi-experimental wx3 branch of Roadnav, and it worked out pretty well! Its not present in any downloads on the Roadnav site yet . You can find it labeled as the “wxWidgets 3 Development Line (alpha)” at the Roadnav download page. Some nice things about using it inside roadnav:

  • You can enter the destination in a street address or raw coordinates
  • It marks the destination on the map that it shows
  • Cross platform support (Windows, Linux, OSX)

Now, there are a number of usability issues present with this implementation of the Cyborg navigation. For one, you can’t mute it (inside the program at least). For two, you can’t actually turn it off yet.

If you want to play with it, you can download the source code via SVN for Roadnav and libroadnav in the wx3 branch. Alternatively, you can download a snapshot from the Roadnav downloads page. If you’re just looking for a C++ version of the cyborg script, you can see it at this link.

Mind you, that whole branch is mostly alpha at the moment, but revision 1715 should work without any significant problems. Hopefully a stable release will be out by the end of summer (no guarantees here though). If you find bugs or have issues with that particular branch, drop me a line!

Despite being (in my opinion) the best open source GPS navigation app out there, I will admit that there are a number of large performance and usability issues with Roadnav. However, I’m hoping that we (though, at the moment its only me doing active development) can optimize it and rework its code base to perform just as well as any commercial GPS apps out there (if you’re wanting to do some development, join the roadnav-devel mailing list or contact me, I have a number of ideas that aren’t in the TODO list yet).

Original XKCD blag post: http://blag.xkcd.com/2008/05/20/gps-cyborg-implant/

SSHFS For Windows

July 9th, 2008

This japanese guy apparently wrote something similar to linux’s FUSE for Windows (supporting user-mode filesystem drivers) and created a number of bindings for it. As a practical example, he’s implemented SSHFS in windows, which is awesome IMHO and exactly what I’ve been looking for.

However, this means someone can now write a filesystem driver in Visual Basic. How awesomely crazy is that?

Go to his site to download SSHFS for Windows.

Standalone GPSD MySQL Logging Daemon – geoHist 0.2 released!

July 3rd, 2008

Well, I am happy to announce the release of version 0.2 of my standalone GPS logging software, geoHist. This version actually makes geoHist useful: you can export the data from the MySQL database into a GPX format. From there you can use a program like Google Earth to display the tracks it records on a map (Note: Google Earth doesn’t work for all tracks… I’m not quite sure why yet, but I’m probably going to change things around to dump to KML format soon).

You can find out more about geoHist at its page: http://www.virtualroadside.com/geoHist/

Validate GPX file in Linux

June 30th, 2008

The website describing the GPX standard describes a way to validate your GPX file in windows, however it does not mention a way to do it in Linux. So heres how you can validate your files (one way of many, I’m sure). The program you use is called xmllint, and in ubuntu, the package that contains this is libxml2-utils …

GPX 1.0:

xmllint --noout --schema http://www.topografix.com/GPX/1/0/gpx.xsd testfile.gpx

GPX 1.1:

xmllint --noout --schema http://www.topografix.com/GPX/1/1/gpx.xsd testfile.gpx

Hope that saves you some time!

The Answer to Infinite Loops

June 29th, 2008

Programmers, we should make our infinite loops more exciting! A lot of times in C or other languages, you see infinite loops represented by things such as

while (1) { /* do stuff here */ }

Or perhaps by

for (;;) { /* do stuff here */ }

Thats so boring! Why not be more creative in your work? I propose that we use the following construct instead

while (42) { /* do stuff here */ }

Now you might ask, why use while() instead of for() or do.. while()? In my opinion, its cleaner (the while part, not necessarily the number part). while() seems like the correct options, since (in my mind, at least) for() implies some set amount of iteration, whereas while() implies keep going until some condition is false. Of course, I do realize that they all do the same thing and each different one can do the same things as the others with some modification.

Yes, that was a rather useless post, but I had to get it off of my chest 🙂

What can you do with 100 bezels?

May 6th, 2008

I’m always on the lookout for creative opportunities, and my latest endeavor has led me to obtain around 100 of these really neat looking plastic bezels from a local business:

Poweredge R200 Bezel (front)Poweredge R200 bezel (back)

Now, it struck me that there’s a really cool use waiting for these things, however I can’t think of anything compelling at the moment. Some ideas that I have:

  • Creating some table or shelf with them
  • Monitor stands
  • Geeky decorations

However, I’m quite sure that theres much more that can be done with these. So the burning question I ask you is… what should I do with them?

Edit: Some other suggestions I’ve received

  • Coffee table
  • Create some kind of katamari out of the dell logos
  • Duct tape based door of some kind

Dynamic Options/Preferences Dialog Library for wxWidgets

April 29th, 2008

So I’ve been doing a lot of work related to my carputer lately, and one of my big focuses is getting Roadnav to be more touchscreen friendly so that I can use it as my primary GPS application. One of the biggest problems I’ve found with most applications (and Roadnav is no exception, unfortunately) is that most of the dialogs are simply too big for my screen. The preferences screen has especially stuck out as an offender here.

To solve this, over the last week I’ve created a set of generic classes that you can use in wxWidgets to create options/preferences dialogs that have a consistent feel to them, and can be easily created at runtime. Its setup in a hierarchical manner, and each layer of the menu is dynamically generated at runtime. Here’s a nice screen shot of the top level menu for your viewing pleasure.

Now, since I’m designing this for a touchscreen, right now the visual design is definitely touchscreen focused. However, its generic enough (thanks to wxWidgets sizers) that you can change the logic in the dialog to whatever you want it to be, without having to change the definition of your menus. In fact, if you do it right you can even switch the look at runtime because of all controls are created at runtime, so each one of the option classes is designed so that you can destroy its controls and then bring it back again.

Another cool option that could be implemented is loading the definitions for the options from an XML file or something similar — I’ve actually created something like that before in C# for the pGina project (see their SVN) — since everything is dynamic, it would be pretty trivial to do that.

Anyways, here’s an overview of how it works:
Read the rest of this entry »

Installing Monroe Quick Struts on my Grand Am

April 26th, 2008

Apparently, the Boston area is notorious for having bad roads and huge potholes. The other day I was driving my 1999 Pontiac Grand Am around here, and I hit some pothole or something really hard… didn’t notice anything wrong though. So a few weeks later when it started really acting up, so I brought it somewhere and appearantly I totally snapped one of the springs in my front left tire, and my struts were bad in the front. With how expensive things are here, they wanted $430 * 2, plus labor costs to fix it… and no, that was not going to happen. Heres a picture of the broken spring/strut next to a new one:

So I found these parts called a quick strut — I got the parts from rockauto.com, and they were around $170 each. They come with the strut, springs, and everything you need, and they’re extremely easy to install! Even though they come with decent instructions, heres a quick howto in case you ever want to do this yourself:

Read the rest of this entry »

Visual Studio Debug Paradox

April 23rd, 2008

So I’m busy working on some new configuration dialogs for the open source GPS program, Roadnav, and Visual Studio decided to access a null pointer or something while using autocomplete, and crashed. Then windows of course displayed the following dialog…

Yeah… like I want to use Visual Studio to debug ITSELF when it JUST CRASHED!!! Geez… like I’m going to trust the program that crashed to figure out why it crashed. Psh.

FYI: Yes, this is sarcasm, I understand the “why” thats going on here.

Hillary Clinton slighted by Time.com?

April 9th, 2008

Below is a rather amusing screenshot of an ad I saw on Time.com….

Who will join this years TIME 100? The ad shows John McCain, Stephen Colbert, Barack Obama, and three other people I can’t identify offhand. I guess they’ve already written Hillary off and shes no longer important… so much for journalistic neutrality.

FYI: I don’t really care for Hillary as a candidate myself… however, I still found this amusing.