Giter VIP home page Giter VIP logo

ais-decoder's People

Contributors

mjaros avatar pwambach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ais-decoder's Issues

Error in Destrination

this.destination = bitField.getString(320, 120); // Error
// correct 
this.destination = bitField.getString(302, 120);

Invalid part number '2' while decoding message type 24

I'm experiencing an issue when parsing high volume satellite AIS data where the below error is being thrown:
Invalid part number '2' while decoding message type 24

This does appear to be relatively rare (maybe every million records I've receiving), but it seems to destroy the stream and there doesn't seem to be anything I can do to handle the error from my side (i.e. log and skip) as I'm receiving the following afterwards:
[ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed

I'm aware part number should alway be 0 or 1, but unfortunately there isn't anything I can do about a faulty transmitter.

I've simply moved the switch and if statements in ais-decoder.ts into a try/catch to prevent destroying the stream but I figured I'd open an issue incase you have a more elegant solution or a reason to destroy the stream on this event.

Error with provided example

import AisDecoder from "ais-stream-decoder" ;

const aisDecoder = new AisDecoder();


In the examples in the readme, this code is used to import and construct an AisDecoder.
upon running the script ($ node index.js)
An error is returned, "TypeError: AisDecoder is not a constructor"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.