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.
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);
}
});
This module was based on the NPM nmea and nmea-0183 packages.