Monday 5 August 2013

Programming in the rain

As per forecast, it was bucketing down today, so I'm glad I didn't go out. Instead, I was sitting warm and dry indoors, watching the rain and programming.

Yesterday, I was embarrassed by loading up the wrong quadrant of data, which meant that when I arrived at the caching location, I had to rely on the data on my iPhone because I can't use my iPhone for geocaching (see below for why), and tapping it into the Loox. Today, I looked for a way to avoid this problem.

I've tried to solve this before. I can't load all 49000 caches onto the Look, it will only take about 20 or 25 thousand. So I have the area quartered into sections, but I can only load one of them, computer-to-Loox, and I couldn't find a way to have the others also sitting on the Loox "just in case". Just in case I screw up again, that is.

Space isn't an issue - I have a 16 gb CF card on the Loox, and there's lots of spare space available,

Today, I found a way!

I use GSAK to store the full database, and feed it on a steady diet of PQs from Groundspeak. Also, with GSAK, I can tell it to check with Groundspeak about the status of caches. Without that, I could go looking for a cache that has been archived, or at least disabled. Each day, I tell GSAK to cough up a GPX file of all unfound caches within 150 km of my home; that amounts to about 49,000. And I've written a perl program that reads that GPX file and spits out:

1. The four quadrants of data as CSV files, which can be imported into Memory Map on the PC, and Memory Map on the PC can send them to the Loox.
2. The html pages for each cache, with hints and logs
3. Cut-down GPX files for the iPhone version of Memory Map, giving locations and hints, but it's pretty useless on the iPhone 3 that I have because each time you move, it takes a minute or two to notice that you've changed position, which is maybe good enough for some purposes, but not for caching.
4. POI files for TomTOM

So, starting with this program, I've added to it, so that the 150-km circle is cut into 16 squares, that means less than 8000 caches in the worst square, and 8000 is an important limit because Geosphere can only handle 8000 caches. Geosphere is what ladysolly is now using on her iPhone 4 (which doesn't suffer from the same problem as the iPhone 3) and she loves it, she says it's the best geocaching thing she's used. I don't like it much, because the mapping it gives you is whatever it can get from the internet, which A) is totally useless when you're away from a good 3G signal, and B) pretty useless at best because the map doesn't show footpaths. But when we're out, I do the navigating, so she doesn't really need much mapping.

So, today I made a breakthrough. I can take each of those 16 files, and run it through GPSBabel to convert from GPX files to MMO files. And MMO is "Memory Map Overlay". So if I copy those files to the Loox, then I can load whichever of them I need, into Memory Map. That will give me the positions of the caches, on an OS map so that I can navigate to them, and when I double-tap on the cache icon, it loads up the HTML file of the cache description, the logs and the hint.

And all of this works without an internet connection, which is quite often the case when I'm out in the middle of nowhere.

1 comment: