Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gps

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gps - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

2

bower.json
{
"name": "gps",
"main": "gps.js",
"version": "0.4.6",
"version": "0.4.7",
"homepage": "https://github.com/infusion/GPS.js",

@@ -6,0 +6,0 @@ "description": "A GPS NMEA parser library",

/**
* @license GPS.js v0.4.6 26/01/2016
* @license GPS.js v0.4.7 26/01/2016
*

@@ -53,3 +53,3 @@ * Copyright (c) 2016, Robert Eisele (robert@xarg.org)

// TODO: better merge algorithm:
// TODO: better merge algorithm:
// 1. update every sat and mark as updated.

@@ -73,3 +73,3 @@ // 2. If last msg, delete all unmarked sats & reset mark

/**
*
*
* @param {String} time

@@ -292,3 +292,3 @@ * @param {String=} date

/**
*
*
* @constructor

@@ -322,3 +322,3 @@ */

$--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh
1) Time (UTC)

@@ -350,3 +350,3 @@ 2) Latitude

'quality': parseGGAFix(gga[6]),
'satelites': parseNumber(gga[7]),
'satellites': parseNumber(gga[7]),
'hdop': parseNumber(gga[8]), // dilution

@@ -368,4 +368,4 @@ 'geoidal': parseDist(gga[11], gga[12]), // aboveGeoid

eg2. $GPGSA,A,3,19,28,14,18,27,22,31,39,,,,,1.7,1.0,1.3*35
1 = Mode:

@@ -411,3 +411,3 @@ M=Manual, forced to operate in 2D or 3D

$GPRMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,ddmmyy,x.x,a*hh
RMC = Recommended Minimum Specific GPS/TRANSIT Data

@@ -453,3 +453,3 @@ 1 = UTC of position fix

------------------------------------------------------------------------------
1 = Track made good (degrees true)

@@ -492,3 +492,3 @@ 2 = Fixed text 'T' indicates that track made good is relative to true north

},
// satelites in view
// satellites in view
'GSV': function(str, gsv) {

@@ -502,3 +502,3 @@

$GPGSV,1,1,13,02,02,213,,03,-3,000,,11,00,121,,14,13,172,05*67
1 = Total number of messages of this type in this cycle

@@ -553,3 +553,3 @@ 2 = Message number

------------------------------------------------------------------------------
1. Latitude

@@ -556,0 +556,0 @@ 2. N or S (North or South)

/*
GPS.js v0.4.6 26/01/2016
GPS.js v0.4.7 26/01/2016

@@ -10,3 +10,3 @@ Copyright (c) 2016, Robert Eisele (robert@xarg.org)

b);}function p(b){switch(b){case "A":return"active";case "V":return"void";case "":return null}throw Error("INVALID RMC/GLL STATUS: "+b);}function q(b){switch(b){case "A":return"autonomous";case "D":return"differential";case "E":return"estimated";case "M":return"manual input";case "S":return"simulated";case "N":return"not valid";case "P":return"precise"}throw Error("INVALID FAA MODE: "+b);}function r(b,a){if("M"===a||""===a)return e(b);throw Error("Unknown unit: "+a);}function f(){if(!(this instanceof
f))return new f;this.events={};this.state={}}var h=Math.PI/180,m=[];f.prototype.events=null;f.prototype.state=null;f.mod={GGA:function(b,a){if(16!==a.length)throw Error("Invalid GGA length: "+b);return{time:l(a[1]),lat:k(a[2],a[3]),lon:k(a[4],a[5]),alt:r(a[9],a[10]),quality:u(a[6]),satelites:e(a[7]),hdop:e(a[8]),geoidal:r(a[11],a[12]),age:e(a[13]),stationID:e(a[14])}},GSA:function(b,a){if(19!==a.length)throw Error("Invalid GSA length: "+b);for(var d=[],c=3;15>c;c++)""!==a[c]&&d.push(parseInt(a[c],
f))return new f;this.events={};this.state={}}var h=Math.PI/180,m=[];f.prototype.events=null;f.prototype.state=null;f.mod={GGA:function(b,a){if(16!==a.length)throw Error("Invalid GGA length: "+b);return{time:l(a[1]),lat:k(a[2],a[3]),lon:k(a[4],a[5]),alt:r(a[9],a[10]),quality:u(a[6]),satellites:e(a[7]),hdop:e(a[8]),geoidal:r(a[11],a[12]),age:e(a[13]),stationID:e(a[14])}},GSA:function(b,a){if(19!==a.length)throw Error("Invalid GSA length: "+b);for(var d=[],c=3;15>c;c++)""!==a[c]&&d.push(parseInt(a[c],
10));a:{c=a[1];switch(c){case "M":c="manual";break a;case "A":c="automatic";break a;case "":c=null;break a}throw Error("INVALID GSA MODE: "+c);}a:{var g=a[2];switch(g){case "1":case "":g=null;break a;case "2":g="2D";break a;case "3":g="3D";break a}throw Error("INVALID GSA FIX: "+g);}return{mode:c,fix:g,satellites:d,pdop:e(a[15]),hdop:e(a[16]),vdop:e(a[17])}},RMC:function(b,a){if(13!==a.length&&14!==a.length)throw Error("Invalid RMC length: "+b);var d=l(a[1],a[9]),c=p(a[2]),g=a[10],f=a[11];return{time:d,

@@ -19,2 +19,2 @@ status:c,lat:k(a[3],a[4]),lon:k(a[5],a[6]),speed:n(a[7]),track:e(a[8]),variation:""===g||""===f?null:parseFloat(g)*("W"===f?-1:1),faa:14===a.length?q(a[12]):null}},VTG:function(b,a){if(10!==a.length&&11!==a.length)throw Error("Invalid VTG length: "+b);if(""===a[2]&&""===a[8]&&""===a[6])return{track:null,trackMagetic:null,speed:null,faa:null};if("T"!==a[2])throw Error("Invalid VTG track mode: "+b);if("K"!==a[8]||"N"!==a[6])throw Error("Invalid VTG speed tag: "+b);return{track:e(a[1]),trackMagnetic:""===

a.fix=b.fix,a.hdop=b.hdop,a.pdop=b.pdop,a.vdop=b.vdop);if("GSV"===b.type){for(var d=b.satellites,c=0;c<d.length;c++)m.push(d[c]);b.msgNumber===b.msgsTotal&&(a.satsVisible=m,m=[])}this.emit("data",b);this.emit(b.type,b);return!0};f.prototype.partial="";f.prototype.updatePartial=function(b){for(this.partial+=b;;){b=this.partial.indexOf("\r\n");if(-1===b)break;var a=this.partial.slice(0,b);"$"===a.charAt(0)&&this.update(a);this.partial=this.partial.slice(b+2)}};f.prototype.on=function(b,a){return void 0===
this.events[b]?(this.events[b]=a,this):null};f.prototype.off=function(b){void 0!==this.events[b]&&(this.events[b]=void 0);return this};f.prototype.emit=function(b,a){void 0!==this.events[b]&&this.events[b].call(this,a)};"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),f["default"]=f,f.GPS=f,module.exports=f):t.GPS=f})(this);
this.events[b]?(this.events[b]=a,this):null};f.prototype.off=function(b){void 0!==this.events[b]&&(this.events[b]=void 0);return this};f.prototype.emit=function(b,a){void 0!==this.events[b]&&this.events[b].call(this,a)};"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),f["default"]=f,f.GPS=f,module.exports=f):t.GPS=f})(this);
{
"name": "gps",
"title": "gps.js",
"version": "0.4.6",
"version": "0.4.7",
"homepage": "https://github.com/infusion/GPS.js",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/infusion/GPS.js/issues",

@@ -8,3 +8,3 @@

GPS.js is an extensible parser for [NMEA](http://www.gpsinformation.org/dale/nmea.htm) sentences, given by any common GPS receiver. The output is tried to be as high-level as possible to make it more useful than simply splitting the information. The aim is, that you don't have to understand NMEA, just plug in your receiver and you're ready to go.
GPS.js is an extensible parser for [NMEA](http://www.gpsinformation.org/dale/nmea.htm) sentences, given by any common GPS receiver. The output is tried to be as high-level as possible to make it more useful than simply splitting the information. The aim is, that you don't have to understand NMEA, just plug in your receiver and you're ready to go.

@@ -177,5 +177,5 @@

- quality: Fix quality (either invalid, fix or diff)
- satelites: Number of satellites being tracked
- satellites: Number of satellites being tracked
- hdop: Horizontal [dilution of precision](https://en.wikipedia.org/wiki/Dilution_of_precision_(GPS))
- geoidal: Height of geoid in meters (mean sea level)
- geoidal: Height of geoid in meters (mean sea level)
- age: time in seconds since last DGPS update

@@ -270,3 +270,3 @@ - stationID: DGPS station ID number

- time: The time given as a JavaScript Date object
- rms: RMS value of the pseudorange residuals; includes carrier phase residuals during periods of RTK (float) and RTK (fixed)
- rms: RMS value of the pseudorange residuals; includes carrier phase residuals during periods of RTK (float) and RTK (fixed)
- ellipseMajor: Error ellipse semi-major axis 1 sigma error, in meters

@@ -351,2 +351,1 @@ - ellipseMinor: Error ellipse semi-minor axis 1 sigma error, in meters

Dual licensed under the MIT or GPL Version 2 licenses.

@@ -61,3 +61,3 @@

'raw': '$GPGGA,234920.000,4832.3918,N,00903.5488,E,1,05,1.7,437.9,M,48.0,M,,0000*51',
'satelites': 5,
'satellites': 5,
'stationID': 0,

@@ -77,3 +77,3 @@ 'time': new Date(today + 'T23:49:20.000Z'),

'quality': 'fix',
'satelites': 8,
'satellites': 8,
'stationID': NaN,

@@ -141,3 +141,3 @@ 'time': new Date(today + 'T12:35:19.000Z'),

'raw': '$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76',
'satelites': 8,
'satellites': 8,
'stationID': null,

@@ -231,3 +231,3 @@ 'time': new Date(today + 'T09:27:50.000Z'),

'raw': '$GPGGA,123519,4807.04,N,1131.00,E,1,8,0.9,545.9,M,46.9,M,,*45',
'satelites': 8,
'satellites': 8,
'stationID': null,

@@ -406,3 +406,3 @@ 'time': new Date(today + 'T12:35:19.000Z'),

'raw': '$GPGGA,092751.000,5321.6802,N,00630.3371,W,1,8,1.03,61.7,M,55.3,M,,*75',
'satelites': 8,
'satellites': 8,
'stationID': null,

@@ -450,3 +450,3 @@ 'time': new Date(today + 'T09:27:51.000Z'),

'quality': 'fix',
'satelites': 8,
'satellites': 8,
'stationID': null,

@@ -453,0 +453,0 @@ 'lat': 41.691079,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc