I have a project i am working on and i could use some help. I am trying to take NMEA GPS sentence in via the regular usb serial interface, parse them and output them on an HD44780 display. The sentences are coming from Flight Simulator X via the fsuipc interface. This is capable of outputting the GPS data from FSX via serial, yielding something like this:
$GPGSV,2,2,08,09,25,213,49,04,23,044,49,06,17,287,49,07,05,089,49*74 $GPRMC,100313.99,A,3344.459045,N,09639.616711,W,0.0,74.9,020810,3.8,E*7A $GPGGA,100313.99,3344.459045,N,09639.616711,W,1,05,0.0,220.9,M,0.0,M,0.0,0000*66
Each burst of data outputs those three lines.
What I'm trying to do is pull the following data out of the strings. Latitude, Longitude, heading, speed and altitude. Then i will display them in the following format on a 20 x 4 LCD display:
LAT:XXXXXXXXXXXXXXXX LON:XXXXXXXXXXXXXXXX SPEED:8888XXXHDG:120 ALT:1200000YYXXXXXXX
When all is done i would have created a panel mount GPS unit of sorts.
I have the LCD display part working fine but i can't seem to find a good example that would allow me to read the GPS strings via serial, parse them and get the data out of them so that i can display them on the LCD.
I would appreciate any help and i'll be glad to post the finished code when it's done so that any other flight sim enthusiast can replicate it if they so choose