Code Monkey home page Code Monkey logo

Comments (4)

Inrixia avatar Inrixia commented on July 25, 2024 2

Not throwing allows for still being able to work with decoded data even if the checksum fails. If you wanted to raise on a invalid checksum then you should be able to just include that check in your decoding pipeline.

from pyais.

Inrixia avatar Inrixia commented on July 25, 2024 2

This library is often used for data analysis.

Couldn't have said it better myself, this is also why this library supports returning None for properties that failed to decode allowing decoding of partial or incomplete messages. Which is a critical feature I have found as lots of AIS data I have worked with may have just the last bit of a message missing but otherwise be completely sound.

@chhs2131 If you have any further questions feel free to ask them. Either way we can close this issue now

from pyais.

M0r13n avatar M0r13n commented on July 25, 2024 1

Yes, @Inrixia is right. This library tends to be liberal in what it accepts. There are reasons for that:

This library is often used for data analysis. This means that a researcher analyzes large amounts of AIS messages. Such message streams might contain thousands of messages with invalid checksums. Its up to the researcher to decide whether he/she wants to include such messages in his/her analysis. Raising an exception for every invalid checksum would both cause a performance degradation because handling of such exceptions is expensive and make it impossible to include such messages into the analysis.

Therefore, we decided to not raise an exception. Instead its up to the user to decide what to do with invalid messages.

from pyais.

M0r13n avatar M0r13n commented on July 25, 2024

See #83

from pyais.

Related Issues (20)

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.