Giter Club home page Giter Club logo

go-nmea's Introduction

go-nmea Go Report Card GoDoc Build Status

A Golang library for decode and serialize standard and proprietary NMEA packet message (GPS information dissector).

Tested with this GPS Module cover L80 gps protocol specification v1.0.pdf. See another NMEA specification.

NMEA Specification

NMEA standard specification provide 58 kind of message with different structure. And more according to GPS devices manufacturer (ex: 40 proprietary message identified prefixed by PMTK for L80 GPS protocol specification).

Syntax: $<talker_id><message_id>[<data-fields>...]*<checksum><CRLF>

Supported NMEA message

The following list will be expanded to manage new types, but now the library can decode and serialize:

  • $GPRMC - Recommended Minimum Specific GPS/TRANSIT Data
  • $GPVTG - Track Made Good and Ground Speed
  • $GPGGA - Global Positioning System Fix Data
  • $GPGSA - GPS DOP and active satellites
  • $GPGSV - GPS Satellites in view
  • $GPGLL - Geographic position, latitude / longitude
  • $GPTXT - Transfert various text information

Usage

Library for parsing (read) or serialize (write) NMEA packets (bijective handling), see below:

package main

import "fmt"
import nmea "github.com/pilebones/go-nmea"

func main() {
	raw := "$GPGGA,015540.000,3150.68378,N,11711.93139,E,1,17,0.6,0051.6,M,0.0,M,,*58"
	
	fmt.Println("Parsing NMEA message:", raw)
	msg, err := nmea.Parse(raw)
	if err != nil {
		fmt.Println("Unable to decode nmea message, err:", err.Error())
		return
	}

	// TODO: Handling complex struct depending on kind of nmea message

	fmt.Println("Craft NMEA packets using Serialize():", msg.Serialize())
}

Documentation

License

go-nmea is available under the GNU GPL v3 - Clause License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.