How can I log GPS NMEA strings to a text file?

19 views (last 30 days)
I have a GPS module (NMEA compliant) connected to a computer via serial (COM) port.
The GPS module is transmitting NMEA strings (as lines of ASCII text) to the computer via a serial COM or virtual COM port:
How can I log the NMEA strings to a text file?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 24 Jul 2017
Please refer to the attached MATLAB example file (GPSLogApp.m, requires MATLAB R2017a), which:
  • creates a graphical user interface
  • shows a list of available serial COM ports
  • connects to the GPS module by using the MATLAB Serial functionality
  • display GGA message data live
  • logs the GPS NMEA strings to a text file

More Answers (0)


Find more on Data Import and Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!