Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ais-decoder-ts
Advanced tools
Readme
The automatic identification system (AIS) is an automatic Tracking system used on ships and by vessel traffic services (VTS). When satellites are used to detect AIS signatures, the term Satellite-AIS (S-AIS) is used. AIS information supplements marine radar, which continues to be the primary method of collision avoidance for water transport.
npm test
format
: !AIVDM, identifies this as an AIVDM packet (AIS format).message_count
: Messages counter (number of messages), sometimes the ais messages will be split over several messages.message_id
:sequence_id
: Sequential message, the current message numberchannel
: vhf channel A/Bpayload
: the ais data itselfsize
: number of bits required to fill the data<format>,<message count>,<message id>,<sequence id>,<channel A/B>,<data>,<fill bits>
constructor(AIS_Messages, safeMode)
AIS_Messages
: Array of ais messages.safeMode
: set to false
by default. when true the module will never throw an error (silent mode).getResults()
- return a collection of the parse messagesprivate decode(input: Array<any>, session: any): void
- decode the raw ais messagesprivate validateRawMessage(input: string): boolean
- validate if the raw messagesnode dist/bin/parse <ais message>
for example: node ./dist/bin/parse "!AIVDM,1,1,,A,13u?etPv2;0n:dDPwUM1U1Cb069D,0*24"
npm run example
// new Decoder(Array<AIS_Messages>, safeMode<Boolean>)
import { Decoder } from '../lib/index';
const aisMessages:Array<string> = [
'!AIVDM,1,1,,A,400TcdiuiT7VDR>3nIfr6>i00000,0*78',
'!AIVDM,2,1,0,A,58wt8Ui`g??r21`7S=:22058<v05Htp000000015>8OA;0sk,0*7B',
'!AIVDM,2,2,0,A,eQ8823mDm3kP00000000000,2*5D',
'!AIVDM,2,1,0,A,58wt8Ui`g??r21`7S=:22058<v05Htp000000015>8OA;0sk,0*7B ',
'!AIVDM,2,2,0,A,eQ8823mDm3kP00000000000,2*5D',
];
const safeMode = false;
const aisDecoder_ex2 = new Decoder(aisMessages, safeMode);
// results will hold a collection of the parsed ais messages
const results = aisDecoder_ex2.getResults();
FAQs
Ais Decoder (TypeScript, Node 12.17.0)
The npm package ais-decoder-ts receives a total of 19 weekly downloads. As such, ais-decoder-ts popularity was classified as not popular.
We found that ais-decoder-ts 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.