ais-json-english
ais-json-english
A npm package about AIS (Automatic Identification System) text decoding.
Originally forked from https://www.npmjs.com/package/ais-json
Decode AIS text, then return JSON object.
npm address: https://www.npmjs.com/package/ais-json-english
Structure
Name | Description |
---|---|
index.js | main function (call decode.js and include verify ais text) |
encode.js | generate ascii6bit.json and num2char.json |
decode.js | decode ais text and return json (base on ascii6bit.json and num2char.json ) |
ascii6bit.json | connect ascii to 6 bit code |
num2char.json | connect number to char |
Install
npm install ais-json-english
Usage
In Terminal
npx ais '!AIVDM,1,1,,A,15Cgah00008LOnt>1Cf`s6NT00SU,0*3D'
Then, you will get:
In Project
Decode AIS Text
# const ais = require('ais-json-english') import ais from 'ais-json-english'let aisinfo = ais
Open SerialPort
If you need it.
cd ais-json-englishnode serialport
Default
Port: COM3
BaudRate: 38400
Encode Table
cd ais-json-englishnode encode
Generate ascii6bit.json
and num2char.json
.
Intend
- CLI