Add error checking to UBXGPS example

* also fix recursion error in processSentence