Search Notebooks
GPS NMEA parser

Porting of free NMEA parser for mbed and sample project

GPS

Page owner: user Ken Todotani

Created 14 Mar 2010.
Last updated 15 Mar 2010

GPS NMEA parser

Page last updated 15 Mar 2010, by   user Ken Todotani   tag GPS | 0 replies  

For project with GPS, I've ported free NMEA parser for mbed.

2010/3/15 Update: Modify trace_h and error_h function to avoid disordered output.

Library Ported

I've ported NMEA Library. Key features of NMEA Library are:

This library may require more RAM than TinyGPS, but can parse almost all NMEA message parameters. For details about NMEA Library, please refer to document attached to the download file (you need to generate html documents by doxygen).

Library can work without modification. I just added cast for a few lines contain malloc() to avoid compiler error.

Sample Project

The following is sample project using NMEA Library.

GPS_nmeaLib

GPS receiver used is Sparkfun GPS Micro-Mini. I changed clock speed to 48MHz and disabled Ethernet MAC to reduce noise from mbed. I think this could improve sensitivity of GPS module a bit...  To change clock speed and power control, mbed Clock Control and mbed Power Control are used.

With line 15 of gps.h (#define SERIAL_OUTPUT) uncommented, which is default, this program send output message to USB serial port as follows:

Trace: $GPGSA,A,2,29,18,22,,,,,,,,,,5.0,4.8,1.0*39
Trace: $GPGSV,3,1,11,22,45,225,32,18,24,186,34,29,16,148,32,30,82,102,*73
Trace: $GPGSV,3,2,11,14,59,327,,05,53,049,,01,47,321,31,12,47,048,*75
9140, Lat: 35.xxxxxx, Lon: 139.xxxxxx, Sig:1, Fix:2, Inuse:3
  sat_id:22, sig:32, Inuse:1
  sat_id:18, sig:34, Inuse:1
  sat_id:29, sig:32, Inuse:1
  sat_id:01, sig:31, Inuse:0

You can obtain not only latitude and longitude, but also fix type, number of satellites in-use, satellite-id, signal level, etc.

With line 15 of gps.h comment out, this program display parse result on LCD with serial interface as follows:

mged GPS

LCD used for this project is soled in Japan only, so it is just for your information.


0 comments

Please log in to post a comment.