Today, I wrote a shell script to load caches onto my Delore PN-30 using GPSBabel, which seems to be the best way I’ve found, so far to use a Delorme GPS with Linux.
In the past, I’ve been using GSAK to load caches on my GSAK, either natively (via dual-boot) or via a virtual machine. Despite GSAK’s killer feature set, it’s a big hassle for a couple reasons:
- It’s not open source, making it, as Bradley Kuhn would say, evil
- After 30 days, it has nag screens on startup, transferring geocaches, opening a new database…pretty much everything useful.
- Did I mention that I have to boot Windows to get it to work?
GSAK is also mega-overkill for what I want to do. I just want to transfer the pocket query zip file that comes in my email onto my handheld. I don’t need mega databases, massive filtering, etc.
I just want to transfer crap.
That’s where GPSBabel comes in. It’s a transfer-and-convert-if-necessary type of thing for gps data. You throw basically anything at it and it spits out whatever you want including dumping it onto your handheld.
So I wrote a shell script that makes it all pretty easy. It takes the zip file I get in my email, decompresses it and transfers it to my handheld. Then it deletes the decompressed data so it’s not cluttering up my ‘putar.
Download the Delorme Pocket Query transfer script here.
You’ll need a couple things to make this work, though, so don’t get too excited.
Deco
First, you’ll need deco and deco-archive.
Deco is a tiny little program that keeps you from having to remember how to use tar/zip/rar/etc on the command line. Considering that the syntax for tar is, as far as I can tell, made up by people who decided that standard shell syntax should be ignored at all possible costs, deco makes things lots easier–you just use it on the file and it works.
Of course, after you download and extract deco and deco-archive (the latter provides the brains so stuff actually gets extracted), you’ll need to build and install them first, but that’s pretty simple:
sudo apt-get install build-essential checkinstall # get your computer ready to compile code
cd deco-1.blahblah
make
sudo checkinstall #this makes a .deb and installs it, instead of the crazy 'normal' way
cd ..
cd deco-archive-1.blahblah
make
sudo checkinstall
That should get deco installed. You don’t have to use deco. If you love wrestling tar, zip, unzip and that ilk and don’t get utterly confused by them, just edit the freakin’ script to get rid of the deco reference.
Then again, if that’s your chicken, you probably don’t need my help installing the only program I can ever compile without getting angry.
GPSBabel
Speaking of not getting angry while compiling, you’re going to want to follow my instructions on how to compile GPSBabel on Ubuntu.
As I’ve mentioned before, the version of GPSBabel in the Ubuntu repo is old–it doesn’t include support for Delorme units, so you need to compile the new version yourself.
Follow my instrutions. You’ll end up less angry.
Usage
Once you’ve got those two things rolling, you should be good to go. Save the pocket query .zip file that Geocaching.com to your hard drive, then connect your PN-XX (in data transfer mode), then run the script on the file just like any other program. For example:
gpsb Your_Pocket_Query.zip
That’ll transfer the pocket query to your Delorme GPS.
Notes and Options
A couple quick notes:
- I’ve got it set up to use the geocaching.com symbols. I think they’re a lot more informative than Delorme’s default little brown treasure boxes. If you hate that, for whatever reason, delete the “
gcsym=1″ in the script. - If you don’t want your hint at the end, delete “
hint_at_end=1″ - I’m still figuring out what happens when you upload the geocaches as an update to the caches you’ve got in the unit currently. So far I haven’t had any problems with that, but if you want to wipe the caches that are currently on the unit before you transfer the new ones, try adding “
nukewpt=1″ after a comma (without a space) right after the gcsym=1 that’s in there now.I haven’t tested this yet, but seems like it SHOULD work. - I recommend updating your Delorme unit to the 2.7 firmware (the link I’ve used in the past seems to be down). This allows you to set up groups (I recommend doing it by geography) and save them to the SD card, so you can keep more than 1000 geocaches on the unit at once.It’s also a good way to implement a safety net in case you delete all your geocaches in the field or some such.
The Delorme Geocaching Transfer Script
Just for you code junkies, here’s the script itself:
#! /bin/sh
for z in $1
do
d=`basename $z .zip`
mkdir $d
unzip $z -d $d
for f in $d/*
do
gpsbabel -i gpx -f $f -o delbin,logs=1,hint_at_end=1,gcsym=1 -F usb:
done
rm $d -r
done
I’ve been thinking about adding a dialog about whether or not the script should delete the original zip file, but I’m not sure I want to add any sort of interactivity–I like the idea of being able to run it without even opening a terminal.
I also want to keep it somewhat manual, as I rarely plug my PN-30 into my computer–I don’t need the script bugging me to put my laptop down and walk upstairs to get my unit, then spend 5 minutes looking for the cable just because I wanted to get the pocket query out of my inbox.
In any case, hopefully this will allow me to sidestep the hassle of using GSAK, or worse, Topo 8.


DIY Coffee Degassing Cannister
an improved design
About a year and a half ago, I wrote about how to make a degassing cannister for home roasted coffee.
My intentions were good, but as it turns out, it was less a degassing cannister and more a ‘superglue taste infuser.’ Not so good.
I’ve been thinking about the problem, though, and with a little help from my wife, side-stepped the problem, namely that every adhesive out there is really smelly.
(More infomation on degassing coffee).
the vent inside the mouth of the mason jar
the trimmed lid
That’s it! You’ve got a very functional degassing cannister.
Granted, it’s probably not 100% airtight. But it’s certainly better than letting your coffee sit open (I usually let new roasts sit overnight in the collander because I don’t want to package them up while their smoking and I most often remember to roast just before going to bed), or packaging them up in your normal airtight container (my good coffee lives in a small airtight pop-top jar, just the right size for one batch in the popcorn popper).
This makes a great middle ground–somewhere I can pour the freshly roasted coffee to give it time to degass without worrying about having it sit out or stew in its own gasses.
And it’s free, and DIY.