https://github.com/pilebones/go-nmea
GPS / NMEA packet message dissector (standard and proprietary)
https://github.com/pilebones/go-nmea
coordinates go golang gps nmea nmea-parser parser
Last synced: 8 months ago
JSON representation
GPS / NMEA packet message dissector (standard and proprietary)
- Host: GitHub
- URL: https://github.com/pilebones/go-nmea
- Owner: pilebones
- License: gpl-3.0
- Created: 2017-07-31T13:04:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-19T02:53:40.000Z (about 4 years ago)
- Last Synced: 2025-04-11T23:52:42.245Z (about 1 year ago)
- Topics: coordinates, go, golang, gps, nmea, nmea-parser, parser
- Language: Go
- Homepage:
- Size: 65.4 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-nmea [](https://goreportcard.com/report/github.com/pilebones/go-nmea) [](https://somsubhra.github.io/github-release-stats/?username=pilebones&repository=go-nmea) [](https://godoc.org/github.com/pilebones/go-nmea) [](https://github.com/pilebones/go-nmea/releases/latest) [](/LICENSE)  [](https://coveralls.io/github/pilebones/go-nmea?branch=master)
A Golang library for decode and serialize standard and proprietary NMEA packet message (GPS information dissector).
Tested with this [GPS Module](http://wiki.52pi.com/index.php/USB-Port-GPS_Module_SKU:EZ-0048) cover [L80 gps protocol specification v1.0.pdf](http://wiki.52pi.com/index.php/File:L80_gps_protocol_specification_v1.0.pdf).
See another [NMEA specification](http://aprs.gids.nl/nmea/).
## 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: `$[...]*`
## 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:
```go
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
- [GoDoc Reference](http://godoc.org/github.com/pilebones/go-nmea).
## License
go-nmea is available under the [GNU GPL v3 - Clause License](https://opensource.org/licenses/GPL-3.0).