Skip to content

ColemanURT/nmea-simple

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM version Travis CI Build Status

NMEA 0183 sentence parser and encoder

This library parses some NMEA 0183 sentences. These are typically used by GPS recievers to send information on position, heading, speed and acuracy. The standard can be found here and is described in clear terms here.

This is a fork of the nmea package with all dependencies removed.

Example

The sentences can be read from the serial port using the NPM serialport package.

var serialport = require('serialport');
var nmea = require('nmea-simple');

var port = new serialport.SerialPort(
    '/dev/cu.usbserial',
    {
        baudrate: 4800,
        parser: serialport.parsers.readline('\r\n')
    }
);
    
port.on('data', function(line) {
	try {
	    console.log(nmea.parse(line));
	} catch (error) {
		console.error("Got bad packet:", line, err);
	}
});

Acknowledgements

This module was based on the NPM nmea and nmea-0183 packages.

About

JavaScript parser for NMEA 0183 sentences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%