GPS reader is the software to read GPS data from the GPS sensor through the serial connection. A GPS sensor should provide the serial communication whether it is the real RS-232 connection or through USB-to-Serial port mapping driver (Thanks to Dr. Wang for this finding). If a user have a GPS sensor with the USB support, then he should find a driver file for this purpose. The raw GPS data that you can get through the serial connection to a GPS sensor is shown below.

  • Sample GPS data
$GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

The source codes below includes three projects, NMEA0183 project including the NMEA data parser(ex. GSV, RMC, GGA, etc.), Serial project including the serial communication libraries and finally AddGPS project which is the sample user interface built on top of other two libraries. This is a tutorial project of the library usage. This software is built on the articles (See below references) on CodeProject. I replaced the serial communication library in the Add GPS support to your desktop to the better one found in Serial library for C++.

AddGPS sample project uses Windows timers to read data every second and the other timer occurring every two seconds is to check whether the serial connection is alive to reconnect. Users may extract the specific NMEA data. Please take look at each header file for each data sentence located under the NMEA0183 directory.

GPS reader program

Download

Media:GPS.zip

References