No description or website provided.
JavaScript
Latest commit 38b02e8 Dec 5, 2014 @omcaree Merge pull request #1 from yetzt/patch-1
ignore non-nmea lines
Permalink
Failed to load latest commit information.
src ignore non-nmea lines Sep 18, 2014
.gitignore Initial commit Apr 29, 2013
Readme.md Initial commit Apr 29, 2013
main.js Initial commit Apr 29, 2013
package.json Initial commit Apr 29, 2013

Readme.md

Serial NMEA GPS Module

This module makes use of the serialport and nmea modules to simplify data collection from a GPS device.

Installation

Install with

npm install serialgps

Usage

Simple usage can be found in main.js

//include the module
var serialgps = require('serialgps');

//create a new instance. arguments are serial port and baud rate
var gps = new serialgps('/dev/ttyO1',9600);

//monitor for data
gps.on('data', function(data) {
    console.log(data);
});

You may also listen for a specific NMEA message type, any of

  • fix - GGA message
  • geo-position - GGL message
  • nav-info - RMC message
  • track-info - VTG message
  • active-satellites - GSA message
  • satellite-list-partial - GSV message

For example,

gps.on('fix', function(data) {
    console.log(data);
});

returns the following...

{ type: 'fix',
  timestamp: '140554.000',
  lat: '5245.5061',
  latPole: 'N',
  lon: '00114.8934',
  lonPole: 'W',
  fixType: 'fix',
  numSat: 5,
  horDilution: 1.81,
  alt: 84.8,
  altUnit: 'M',
  geoidalSep: 47.5,
  geoidalSepUnit: 'M',
  differentialAge: 0,
  differentialRefStn: '',
  talker_id: 'GP' }