This project is designed to process NMEA GPGGA messages from a text file. The program extracts and validates critical data such as time, latitude, longitude, and satellite count from each GPGGA message and outputs this information to the console.
main.c
: The main C source file containing the implementation of the NMEA GPGGA message processing.nmea_messages.txt
: The input text file containing NMEA messages.gcc
:
gcc -o nmea_processor main.c
Prepare the Input File:
Ensure that your input file nmea_messages.txt
is in the same directory as the compiled executable. The file should contain NMEA messages, one per line.
./nmea_processor
nmea_messages.txt
):$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
$GPGGA,invalid message
$GPGGA,225444,3731.234,S,14507.567,W,1,12,0.8,12.0,M,-34.0,M,,*75
Time: 12:35:19.000, Latitude: 4807.038N, Longitude: 01131.000E, Satellites: 8
Error: Invalid message type
Time: 22:54:44.000, Latitude: 3731.234S, Longitude: 14507.567W, Satellites: 12
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please fork this repository and submit a pull request for any enhancements or bug fixes.
Check out my GitHub profile: Esmail Sarhadi
View this project on GitHub: NMEA-GPGGA-Message-Processor
If you find this project helpful, consider making a donation:
For any questions or suggestions, please feel free to contact me at [sarhadiesmail@gmail.com].