Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AIS length validation less restricted #121

Open
qtran opened this issue Sep 4, 2020 · 3 comments
Open

Make AIS length validation less restricted #121

qtran opened this issue Sep 4, 2020 · 3 comments

Comments

@qtran
Copy link

qtran commented Sep 4, 2020

Hi,
would it be possible to make the AIS length validation less restricted or configurable?
Due to tests with different AIS sources we noticed that sometimes that it is required to increase the maximum length.

Best regards

@ktuukkan
Copy link
Owner

ktuukkan commented Nov 17, 2020

Hi @qtran, could you give some example cases?

@RiseOfDeath
Copy link

RiseOfDeath commented Nov 21, 2022

I faced this problem too.

Seems that it hardcoded: As example in AISPositionReportParser.java:
if (content.length() != 168) throw new IllegalArgumentException("Wrong message length");

@ktuukkan
Copy link
Owner

ktuukkan commented Nov 29, 2022

Please provide more context and sample data - or preferrably a pull-request proposing a fix.

Regarding the hard-coded value, it is according the AIS specification where the length of both A and B reports is 168:

Screenshot from 2022-11-29 12-38-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants