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

@signalk/nmea0183-signalk

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@signalk/nmea0183-signalk - npm Package Compare versions

Comparing version 3.10.7 to 3.10.8

8

hooks/VTG.js

@@ -65,5 +65,3 @@ 'use strict'

speed = utils.transform(utils.float(parts[6]), 'kph', 'ms')
}
if (utils.float(parts[4]) > 0 && String(parts[5]).toUpperCase() === 'N') {
} else if (utils.float(parts[4]) > 0 && String(parts[5]).toUpperCase() === 'N') {
speed = utils.transform(utils.float(parts[4]), 'knots', 'ms')

@@ -80,7 +78,7 @@ }

path: 'navigation.courseOverGroundMagnetic',
value: utils.transform(utils.float(parts[2]), 'deg', 'rad'),
value: parts[2].length === 0 ? null : utils.transform(utils.float(parts[2]), 'deg', 'rad'),
},
{
path: 'navigation.courseOverGroundTrue',
value: utils.transform(utils.float(parts[0]), 'deg', 'rad'),
value: parts[0].length === 0 ? null : utils.transform(utils.float(parts[0]), 'deg', 'rad'),
},

@@ -87,0 +85,0 @@ {

{
"name": "@signalk/nmea0183-signalk",
"version": "3.10.7",
"version": "3.10.8",
"description": "A node.js/javascript parser for NMEA0183 sentences. Sentences are parsed to Signal K format.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,2 +21,3 @@ /**

const chai = require('chai')
const expect = chai.expect

@@ -48,2 +49,25 @@ chai.Should()

})
it('Outputs nulls for missing values', () => {
const delta = new Parser().parse('$GPVTG,,T,,M,0.102,N,0.190,K,A*28')
delta.updates[0].values.should.contain.an.item.with.property(
'path',
'navigation.courseOverGroundMagnetic'
)
expect(delta.updates[0].values[0].value).to.be.null
delta.updates[0].values.should.contain.an.item.with.property(
'path',
'navigation.courseOverGroundTrue'
)
expect(delta.updates[0].values[1].value).to.be.null
delta.updates[0].values.should.contain.an.item.with.property(
'path',
'navigation.speedOverGround'
)
delta.updates[0].values[2].value.should.be.closeTo(0.0528, 0.00005)
})
})
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