Hi,
if (!strcmp("$GPGLL") {
...
how about a proper gpsd-integration? I've some spare time in the end of this month to try it. I would parse only one least common NMEA-sentence. As Mad said the "GPRMC"-sentence should be a good candidate for this. All other GPS-input-messages could be read via libgpsd from gpsd (which seems to be able to read even most obscure GPS-binary formats).
if anyone wants to continue on that, I had started with something similar already in the past, but not continued:
http://vogel.cx/git/0001-GPS-Support-for-GPRMC-sentence.patch
You can already use gpsd by creating a fifo, and telling it to osmocom as a device. Then, in another session, run gpspipe -r >fifo.
Greetings,
Chris