gpsdll2mh.py

This project stems from a frustration in needing a linux-based program to display my whereabouts in Maidenhead LOCATOR (Grid Square) terms. What I have ended up with is a universal [cough, cough] GPS-data-to-Lat/Long-to-Locator program that will run on Windows®, linux, MacOS®, Crays - even your Nokia cell phone!

With a couple of provisos: to have a recent version of the "Python" programming language installed... and...

... there is a software suite available to run on Linux machines (like my old Dell laptops with Ubuntu linux installed) called `gpsd'. It stands for "GPS Daemon". That's not a devil-in-disguise but a 'server' program that runs in the background - like a web server does.

This one connects and talks to your GPS receiver in the most efficient 'GPS-speak' it can negotiate and makes the GPS data available to other programs using a standardised message format. The extremely clever folks at the `gpsd' project have done all the hard work.

`gpsd' will talk to Garmins, SiRF-Star boards, Motorola devices, et cetera in their "own language" and then push this information out to other software in a sort of GPS-esperanto that is much less ambiguous than NMEA.

The `gpsdll2mh' program connects to a gpsd daemon running on the same computer, or on another machine accessible over a network, and prints out the location of the GPS device as both Latitude/Longitude and LOCATOR; every so-many seconds.

So, in a 'rover' contest or on a WAB trip, the radio operator will know immediately when the vehicle has transited from one (small) square to another.

Presently, gpsdll2mh runs in a Command Prompt or Terminal. I have plans to convert it into a window-ed application just as soon as I can work out how to do it!
(If anyone with python-gui skills (Tk or Qt) reading this can give me some pointers, I will will be most grateful)
I envisage a resizable window (where the font inside grows with the window) so that it can be made sufficiently large to be easily seen on the screen. At the moment, using the Zoom function of a Gnome (linux) terminal window you can do this adequately. On a windows system, the Properties of the Command Prompt `DOS box' can be changed to use a BIG typeface size (say, 36 pixels high).

As I mentioned before, the program isn't finished just as I'd like it (the GUI version) and I have one or two nips and tucks yet to complete so as to (optionally) untie it from `gpsd's coat-tails. But right now it does what I set out to do so it may as well be exposed to a bit of peer review.

That said, I can't take all the credit for the program because I copied the LOCATOR calculation part from lonlat2maidenhead a python script that I found on the internet when looking for a linux replacement for the Windows® program, TAC32 that I had used in the past.

So that's my excuse: here's a download link containing gpsdll2mh.py but if you are not prepared to sully your machine downloading the file you'll find a link to the text below. It's public domain - AFAICT - but please credit (and advise) the authors if you use this code in your own programs.

gpsdll2mh.py

last updated: 20090511