New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nmea0183-signalk

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nmea0183-signalk - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

test/RMC.js

64

codecs/RMC.js

@@ -66,33 +66,35 @@ /*

var self = this;
// Position
multiplexer
.self()
.group('navigation')
.set('position', {
source: this.source(input.instrument),
timestamp: ts,
longitude: self.coordinate(values[4], String(values[5]).toUpperCase()),
latitude: self.coordinate(values[2], String(values[3]).toUpperCase())
})
;
var vals = [
{ path: 'courseOverGroundTrue', value: self.transform(self.float(values[7]), 'deg', 'rad') },
{ path: 'speedOverGround', value: self.transform(values[6], 'knots', 'ms') }
];
if(typeof values[9] !== 'undefined' && typeof values[10] === 'string') {
vals.push({ path: 'magneticVariation', value: self.transform(this.magneticVariaton(values[9], values[10]), 'deg', 'rad') });
}
// Other
multiplexer
.self()
.group('navigation')
.source(this.source(input.instrument))
.timestamp(ts)
.values(vals)
;
var vals = [{
"path": "navigation.position",
"value": {
longitude: self.coordinate(values[4], String(values[5]).toUpperCase()),
latitude: self.coordinate(values[2], String(values[3]).toUpperCase())
}
},{
"path": "navigation.courseOverGroundTrue",
"value": self.transform(self.float(values[7]), 'deg', 'rad')
},{
"path": "navigation.speedOverGround",
"value": self.transform(values[6], 'knots', 'ms')
},{
"path": "navigation.datetime",
"value": ts.substring(0,10)+'T'+ts.substring(11,19)+'Z'
}];
if(typeof values[9] !== 'undefined' && typeof values[10] === 'string') {
vals.push({ path: 'navigation.magneticVariation', value: self.transform(this.magneticVariaton(values[9], values[10]), 'deg', 'rad') });
}
// Position
multiplexer.self();
multiplexer.add({
"updates": [{
"source": this.source(input.instrument),
"timestamp": ts,
"values": vals
}],
"context": multiplexer._context
});
return true;

@@ -99,0 +101,0 @@ });

{
"name": "nmea0183-signalk",
"version": "0.4.1",
"version": "0.5.0",
"description": "NMEA0183 to Signal K parser",

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

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