Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
node-red-contrib-compass
Advanced tools
A Node-RED node to convert a degree to a compass point, or the other way around
A Node-RED node to convert a degree to a compass point, or the other way around.
Run the following npm command in your Node-RED user directory (typically ~/.node-red):
npm install node-red-contrib-compass
Please buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...
The following example flow demonstrates how to convert a degree into a compass point, or a compass point in into a degree:
[{"id":"bec07115.9b64a","type":"compass-point","z":"11289790.c89848","direction":"toCompass","subset":"secondary","language":"en","inputField":"payload","outputField":"payload","name":"","x":620,"y":680,"wires":[["cc38d99.2386a28"]]},{"id":"122e96c9.988c69","type":"inject","z":"11289790.c89848","name":"","topic":"","payload":"270","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":450,"y":680,"wires":[["bec07115.9b64a"]]},{"id":"cc38d99.2386a28","type":"debug","z":"11289790.c89848","name":"Compass point","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":830,"y":680,"wires":[]},{"id":"6e6a70de.f4f7e","type":"compass-point","z":"11289790.c89848","direction":"toDegree","subset":"secondary","language":"en","inputField":"payload","outputField":"payload","name":"","x":620,"y":740,"wires":[["f863e65b.64a378"]]},{"id":"bba77ff8.e726","type":"inject","z":"11289790.c89848","name":"","topic":"","payload":"W","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":450,"y":740,"wires":[["6e6a70de.f4f7e"]]},{"id":"f863e65b.64a378","type":"debug","z":"11289790.c89848","name":"Degree","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":740,"wires":[]}]
direction: "NNE"
description: "Noth-northeast"
Specify the direction of the convertion:
A subset can be used to fine tune the result, when the direction is "degree to compass point". For example to round to the nearest accepted cardinal direction.
The following subset filters can be selected:
The language which needs to be used:
Remark: when your language is not supported yet and you want to contribute by creating a translation, please have a look at the files in the languages folder and share your translation with me.
The field name in the input message, that will contain the value that needs to be converted. By default the input value will be located inside the msg.payload
field.
The field name in the output message, that will contain the converted value. By default the output value will be located inside the msg.payload
field.
There are 16 major directions available on a compass:
Name | Legend |
---|---|
N | North |
NNE | Noth-northeast |
NE | Northeast |
ENE | East-northeast |
E | East |
ESE | East-southeast |
SE | Southeast |
SSE | South-southeast |
S | South |
SSW | South-southwest |
SW | Southwest |
WSW | West-southwest |
W | West |
WNW | West-northwest |
NW | Northwest |
NNW | North-northwest |
FAQs
A Node-RED node to convert a degree to a compass point, or the other way around
The npm package node-red-contrib-compass receives a total of 17 weekly downloads. As such, node-red-contrib-compass popularity was classified as not popular.
We found that node-red-contrib-compass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.