npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-ais-decoder

v1.2.5

Published

Decodes AIS messages from an AIS receiver such as rtl-ais.

Downloads

65

Readme

node-red-contrib-ais-decoder

A Node-Red node to decode AIS message strings

Introduction

The automatic identification system (AIS) is an automatic tracking system that uses transponders on ships. AIS is intended, primarily, to allow ships to view marine traffic in their area and to be seen by that traffic. Further information is available in Wikipedia.

This node accepts AIS messages as input, decodes them, and presents the decoded data at the output. It is mainly intended for use with the rtl-ais software, though it can easily be used in other contexts - e.g. as an online AIS decoder like this one.

It is a condition of use of this software that it shall not be relied on in a safety-critical application, such as for marine navigation.

Install

Run the following npm command in your Node-RED user directory (typically ~/.node-red):

npm install node-red-contrib-ais-decoder

You will find a new node ais in the 'parser' pallette of the node-red editor.

Usage

Input

The input is a stream of AIS messages. There must be no more than one AIS message per node-red message.

Some AIS messages have multiple parts. Each part should be in its own node-red message, and the parts should be presented in sequence. The AIS decoder will accumulate the parts until all parts have been received before outputting the decoded information.

Output

The output message contains the decoded data or error information. See the node description in the Node-Red editor and the Github wiki for more information.

Example Flows

To load an example flow, go to the node-red menu at the top right of the screen and select Import. Click on Examples, then choose the relevant example from the node-red-contrib-ais-decoder folder.

Live AIS data recorder

rtl-ais-flow.json

This flow listens on port 10110 for UDP packets from the rtl-ais software. It decodes the packets and stores the decoded information in JSON format in a local file.

If an erroneous packet is detected, a message is logged in the node-red debugger.

Sample file decoding

sample-file-flow.json

This flow reads AIS messages from a file and displays selected decoded messages in the debug window.

AIS online decoder

web-decoder-flow.json

This flow reads one or more AIS messages from a web input form and displays the output in your browser. Go to http://your.own.ip.address:1880/aisdecode then enter an AIS message and click Decode.

References

  1. Wikipedia article on AIS
  2. Software to receive AIS messages through an RTL-SDR radio dongle
  3. AIVDM/AIVDO protocol decoding by Eric S. Raymond - full description of AIS message format
  4. GitHub - the node's github repository