MATLAB Answers

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

7 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:
$GNZDA,180755.000,20,07,2017,,*47
$GPGGA,180755.000,4217.9848,N,07121.0476,W,1,18,0.6,83.6,M,-33.8,M,,0000*5A
$GNRMC,180755.000,A,4217.9848,N,07121.0476,W,0.00,0.03,200717,,,A*61
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

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!