Another task on my “to do” list was to work out the various settings that could be enabled on the GPS receiver itself. After a bit of research I decided that I was only interested in the RMC and GGA outputs.
I was already getting the RMC data which gave me latitude, longitude, ground speed, track angle, date, and time. By adding the GGA sentence I would also get altitude, the number of satellites that the unit was using, and a couple of reference values for the quality of the data.
I enabled the GGA output, and went to work getting the parsing routines capable of managing two different sentences. Overall this should have been a rather simple task, but while I was splitting the code up into sub routines a couple of weeks ago, I misplaced a variable that managed the position in the parsing buffer. This caused no issues when only one type of sentence was being output from the GPS. Once the GPS started sending two sentences back to back, the result was not so pretty. Basically I lost half of a Sunday trying to debug this. Once I found the missing “return”, it was a quick task to get the new variables parsed out for the LCD.
I revisited the menu function, and added the appropriate handlers so that I could use button two to toggle between the a screen with location data, and one with direction, altitude, ground speed, and satellite count.