That's some crafty workmanship there.
I had to break out the kids optic / survival toy again so I could double up the lenses and see what I was doing. I love that thing. I swear one of these days I'm getting something just like it for myself, except with a light and a way to strap it on my head.
Yeah, I know. Who needs a GPS when you got one of these beauties.
Surprisingly, the serial GPS actually worked right away. Well sorta. Apparently you have to flip the thing so the antenna side faces up. That took me much, much longer than you might imagine to figure out. And it still bites me about every other time I try to use it. What are the odds of that? Anyhow, I spent some time off and on over the next few weeks tinkering with the software and made my NMEA parsing code in pspmaps somewhat more robust before taking it out in the car for a road trip to Boston. I had a brief moment of panic when I laid the GPS on the dash, antenna side down, and the map refused to move. Darn it.
Antenna side up works better.
Here it is tracking one of those seemingly endless miles we covered on the highway. You probably can't see it too well due to my shoddy camera work, but the route is mapped out in a blue overlay.
Beware. Shaky-cam gives me a headache.
Sadly, this is the wife's car so the background music is provided by "Boston's favorite radio station", and not my awesome collection on the zipit.
This GPS runs off the +3.3V line exposed by the zipit expansion connector, so it works just fine on battery power only. That's a distinct advantage over the USB GPS. And now that the weather's cooled off a bit, my wife has started agitating to do some local hiking. So I'm planning to take the zipit along to see how far its ancient battery will go with the GPS active. Hopefully we won't get lost.
Another advantage the serial GPS over the USB GPS is that it works on an IZ2S SD card with the stock zipit kernel and bootloader, so no flashing is required. Just pop in a mini SD card loaded up with IZ2S and boot. No hardware mods are needed either, other than slicing up the Axim cable. So I left the scary soldering gun in the closet. You could conceivably do this with an off the shelf zipit, if you could find such a thing, and a mini SD card loaded up with IS2S. I've got the new pspmaps installed now on the old zipit with rockbox that I keep in the car at all times for music that's never been heard on a ClearChannel playlist.
For the code I reworked my built-in NMEA serial polling module in pspmaps, so now it's configurable by editing a very simple gps.dat file in the pspmaps/data directory. And it's also now robust enough to handle multiple GPS disconnect / reconnect events. It'll still try to use gpsd if it finds the gpsdclient shared library, but I wouldn't recommend that unless you really need to multiplex the GPS data to more than one client program for some reason. The pspmaps sources are updated on github. And it's also bundled up in a package for the bleeding edge openwrt zipit linux distribution.
Last but not least, I wrangled some example code from the internet into a script so I can quickly set the system clock on the zipit from the GPS. That might be handy if I were to go on an evening hike away from the wifi and just happened to lose my watch and phone, but not the zipit and GPS dongle. :-)
Here's the script. It also saves the fix location to a file in /tmp. Maybe someday I'll add an option to the nightsky program to look for that file.
gpstime.sh
Here's a new IZ2S pspmaps executable.
pspmaps-2_4_2_2-iz2s.zip
This is the new "bleeding edge openwrt" pspmaps package
pspmaps_337334a711-2_pxa.ipk
I also have an executable for the older openwrt distribution (built on uclibc instead of musl) but I have to track it down and maybe make a package. I'm pretty sure I posted a link to it, so you can search for it in the zipit IRC logs. Or just make the move to the bleeding edge openwrt like everyone else.
Update October 1, 2016:
Did I say "end of the road"? Oops. No sooner had the words hit the internet when I was reminded on the zipit IRC channel about zgps, my specially resized version of cgps for the small screen. So I bumped the patch to match the newer gpsd in the openwrt zipit bleeding edge repository and compiled it. Mozzwald ran a build, so the tweaked cgps should now be in the gpsd-clients package, and I stashed an executable here for just in case.
zgps-bleeding-wrt-exe.tgz
I was also reminded that I left my Navit port in limbo, only lightly tested and full of potential. So I dusted it off and fetched a new chunk of map to test it with. It's still sorta slow, but apparently works better on the zipit than I remembered. Here's a screen shot advertising the many varied attractions of downtown Springfield.
Plenty of parking, but watch out for that nuclear waste dump.
Is that a soccer ball? Anyhow, now I'm gonna have to hook this up to the GPS and see what it can do...
Update October 12, 2016:
A few heavy duty road tests later, I can honestly say the performance of navit is not too shabby on the zipit. I tested the IZ2S build first and had no real complaints. Maybe the 3D view was a teensy bit laggy at highway speeds, but I can't really say, because my eyes were mostly glued to the road. Really, I swear! Safety first... Next I created a build for the zipit openwrt bleeding edge and tried that out. No complaints there either, so I made a package and hooked up a gmenu2x launcher for it.
Starting navit from the GUI is so much easier than a command line launch.
The openwrt package is in the usual place.
navit_0.5.0-1_pxa.ipk
I made a new IZ2S package as well, refreshed to the newer source code that I used for the openwrt build. Since I don't use the locales on IZ2S, and they take up a boatload of space, I broke them out into a separate zip file. The navit package also requires glib if you don't already have it.
navit-0-5-0-iz2s.zip
navit-0-5-0-locales-iz2s.zip
Next, I'm considering borrowing the pspmaps google route fetching code to make navit textfile maps so you can get a route via wifi and then hit the road with navit. And then if I feel really ambitious I might just try to make it speak.
Update November 31, 2016:
I made some progress on a small pspmaps to navit route converter app for gmenu2x. You can find a link to it in the IRC logs, but I have to redo it somewhat to work better with the openwrt flavor of gmenu2x.
Meanwhile mozzwald took the navit package, enabled lots of stuff and took some much cleaner videos than mine. No shakey-cam. Since he hasn't blogged about it yet himself, I feel compelled to show one here for now. It's got the 3D display, OSD elements, Flite text to speech, and on the fly routing enabled.
Altogether it's a bit of a jumbled mess, but some of it's actually useful in limited situations. Apparently active routing actually works on short trips. I was a bit surprised by that. Must be the zram that makes that possible.
Hi deeice,
ReplyDeleteAmazing post!
I'm thinking about the idea of porting nxlib + FLTK 1.3 to NuttX. Do you know NuttX? It is an POSIX RTOS with many features and subsystems similar to Linux.
I think porting nxlib to NuttX will open the doors to many Linux applications.
You work is inspiring me! Thank you very much!