Coder Social home page Coder Social logo

simpleais's People

Contributors

astuder avatar wpietri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simpleais's Issues

Incorrect longitude/latitude scaling for message 27

First, thanks for your work on simpleais, it is quite useful.

I noticed that simpleais reports bad longitude/latitude values for message 27. The root cause appears to be that _parse_lon/_parse_lat use a scale factor of 4 (10^4) regardless of message type, which gives incorrect results for message 27. Message 27 longitude/latitude has a lower resolution (degrees/10) than other AIS message types (degrees/10000).

Excerpt from the standard:
image

Cheers

Message type 24 (Class B static data) does not detect and correctly decode part B

Message type 24 comes in two variants, called "part A" and "part B". simpleais always returns both sets of fields.

Example message: !AIVDM,1,1,,B,H5NhCmTN7B=400500000001P0004,0*56

Decoded by simpleais:

type 24
repeat 0
mmsi 367793110
partno 1
shipname G!4#Q@@AP@@@@@@@X
ignored-160 4
shiptype Fishing
vendorid GRM
model 1
serial 5
callsign
to_bow 12
to_stern 0
to_port 0
to_starboard 0
mothership_mmsi 25165824
ignored-162 4
text None

Correct decoding (via Maritec):

type 24
repeat 0
mmsi 367793110
part_no 1
type fishing
vendorid GRMD@@E
callsign @@@@@@@
to_bow 12
to_stern 0
to_port 0
to_starboard 0
spare 4

The output for shipname may be uninitialized memory, at one occasion I got C: DRIVE - Edit: Never mind, there's a ship with that name :)

This type may require some custom handling as the documentation for AIVDM merged both definitions into the same table:
https://gpsd.gitlab.io/gpsd/AIVDM.html#_type_24_static_data_report

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.