Skip to content
/ nmea Public

A light library for parsing the parameters inside a NMEA sentence and detecting the parameter type.

License

Notifications You must be signed in to change notification settings

hamsadev/nmea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nmeaSentence

A light library for parsing the parameters inside a NMEA sentence and detecting the parameter type.

Dependencies

Param
Str

How to use

  1. Prepare a NMEA sentence. Like:
char GGA_testSentence[] = "$GPGGA,002153.000,3342.6618,N,11751.3858,W,1,10,1.2,27.0,M,-34.2,M,,0000,*5E";
  1. Add nmea, Param and Str lib to your project
  2. Include nmea.h
#include "nmea.h"
  1. Create an instance of "NMEA_sentence" struct to hold the parser result
NMEA_sentence nmea;
  1. Create an array of "NMEA_Field" to hold the parameters
NMEA_Field fields[GGA_fieldNum];
  1. Use "NMEA_parseSentence" function to parse GGA_testSentence like this:
NMEA_LenType ret = NMEA_parseSentence(&nmea, &fields, GGA_fieldNum, GGA_testSentence);
  1. If the output is smaller than 0, there is a problem in the parsing process, otherwise the result is the number of fields that have been parsed and saved.
  2. You can find the details of the parsing operation through nmea

License

MIT

Docs

NMEA Reference Manual-Rev2.1-Dec07
NMEA data

About

A light library for parsing the parameters inside a NMEA sentence and detecting the parameter type.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages