Externally configurable nmea0183 sentence analyser in a go package


Essentially functional but undergoing development and testing. Some experimental features may be added or removed as the package is being developed for use in my navigation system.
Features marked with * are under development and refinement, templates are being refined as further sentences tested.

Features and reason to develop:

  • Sentences fully customisable and configurable via a Yaml file so can be adjusted for device differences
  • No built in sentence assumptions only a wide range of field formats built in.
  • Check sum verification – Can be optional, automatic if present, or mandatory *
  • Sentence definitions and config can be preloaded and multiple sentences passed
  • Minimal processing for speed / processor use
  • Results returned in string format for ease of print out, logging, transfer by UDP, channels etc
  • Results mapped to user named map keys.
  • Sentence fields can be ignored if not required
  • Variables can be mapped to different sources for example when using two GPS systems
  • Designed for continuous processing and data logging
  • Optional Results processing functions*
    • Post parsing results to extract date and time across multiple sentences -useful to set Raspberry Pi clock
    • Post parsing result to map to key names referencing channel, sentance and/or device
    • Current status processing to collect data from multiple sentences and remove expired data
    • Lat/long position from string to float
    • Lat/Long Position from float to string


  • No plans to support AIS
  • Only supports comma delimited fields and messages starting with $
  • Limited to passing sentence fields which match built templates


Assuming you have installed go and are outide of GOPATH:

go mod init  your_module
go get github.com/martinmarsh/nmea0183
go get github.com/spf13/viper

copy /example/main to same directory to same directory as go.mod
copy /example/nmea_config.yaml to same directory as main.go

go install your_module

run your code and update yaml file as required 

To use:

See main.go in example

import (


results := nmea0183.Parse("$GPZDA,110910.59,15,09,2020,00,00*6F")


View Github