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

freeboard-sk-helper

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freeboard-sk-helper - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

7

CHANGELOG.md
# CHANGELOG: Freeboard-SK-Helper
### v1.2.4
- **remove**: `navigation.courseGreatCircle.nextPoint.bearingTrue` calculation (available in `signalk-derived-data` plugin `Course Data`).
- **update**: Use `setPluginStatus` and `setPluginError` instead of deprecated `setPoviderStatus` and `setProviderError`
### v1.2.3
- **fix**: Issue where after upgrading from previous version putting value`navigation.courseGreatCircle.previousPoint.position` thowing an exception.
- **fix**: Issue where after upgrading from previous version putting value `navigation.courseGreatCircle.previousPoint.position` thowing an exception.

@@ -7,0 +12,0 @@ ### v1.2.2

2

package.json
{
"name": "freeboard-sk-helper",
"version": "1.2.3",
"version": "1.2.4",
"description": "Freeboard-SK helper plugin for SignalK Server.",

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

@@ -168,16 +168,2 @@ "use strict";

}));
subscriptions.push(// ** handle navigation.position. calc bearingTrue
server.streambundle.getSelfBus('navigation.position')
.onValue((v) => {
server.debug(`*** ${JSON.stringify(v.value)} ***`);
if (navData.nextPoint.position) {
let val = {
path: 'navigation.courseGreatCircle.nextPoint.bearingTrue',
value: bearingTo(v.value, navData.nextPoint.position)
};
server.debug(`****** Emit course bearingTrue: ******`);
server.debug(JSON.stringify(val));
server.handleMessage(plugin.id, { updates: [{ values: [val] }] });
}
}));
subscriptions.push(// ** handle nextPoint.arrivalCircle Update

@@ -198,6 +184,18 @@ server.streambundle.getSelfBus('navigation.courseGreatCircle.nextPoint.arrivalCircle')

}));
server.setProviderStatus('Started');
let msg = 'Started';
if (typeof server.setPluginStatus === 'function') {
server.setPluginStatus(msg);
}
else {
server.setProviderStatus(msg);
}
}
catch (err) {
server.setProviderError(`Started with errors!`);
let msg = 'Started with errors!';
if (typeof server.setPluginError === 'function') {
server.setPluginError(msg);
}
else {
server.setProviderError(msg);
}
server.error('** EXCEPTION: **');

@@ -220,3 +218,9 @@ server.error(err.stack);

}
server.setProviderStatus('Stopped');
let msg = 'Stopped';
if (typeof server.setPluginStatus === 'function') {
server.setPluginStatus(msg);
}
else {
server.setProviderStatus(msg);
}
};

@@ -480,16 +484,2 @@ const initSKRoutes = (router) => {

};
//*** Calculate the bearing between two points in radians ***
const bearingTo = (srcpt, destpt) => {
let lat1 = degreesToRadians(srcpt.latitude);
let lat2 = degreesToRadians(destpt.latitude);
let dLon = degreesToRadians(destpt.longitude - srcpt.longitude);
let y = Math.sin(dLon) * Math.cos(lat2);
let x = Math.cos(lat1) * Math.sin(lat2) -
Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLon);
let brad = Math.atan2(y, x);
let bdeg = radiansToDegrees(brad);
return (bdeg < 0) ? degreesToRadians(360 + bdeg) : brad;
};
const degreesToRadians = (val = 0) => { return val * Math.PI / 180; };
const radiansToDegrees = (val = 0) => { return val * 180 / Math.PI; };
//*** Course data processing ***

@@ -496,0 +486,0 @@ const handlePutCourseData = (context, path, value, cb) => {

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