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

How to Parse NMEA 4.0 #98

Open
viper132 opened this issue Dec 21, 2018 · 3 comments
Open

How to Parse NMEA 4.0 #98

viper132 opened this issue Dec 21, 2018 · 3 comments
Labels

Comments

@viper132
Copy link

viper132 commented Dec 21, 2018

this is the example of the message that i get :

\g:1-2-73874,n:157036,s:r003669945,c:12415440354A!AIVDM,1,1,,B,15N4cJ005Jrek0H@9nDW5608EP,013

This is the example doc
annotation 2018-12-21 183251

@ktuukkan
Copy link
Owner

Hi,

Sentences with tag blocks are not supported at the moment and unfortunately not even recognized as valid sentences. This would require changes both in validation and parsing of data. Once parsed, the tags could be delivered in SentenceEvent along with the actual sentence. I'll look into this and see how it could work, but cannot promise a schedule for it.

However, as a small relief, I've been working on exposing the data reader base class which would at least allow you to strip the tags and get the actual sentences passed through. This change will be published soon and maybe bypassing the tags could be added as a default behaviour until the parsing is done.

@viper132
Copy link
Author

thankyou for your answer..
for now i just parsing the sentence to get the !AIVDM AIS format..
can i ask u something.. what is the best way to make data stream via websocket with this api..
Thankyou

@ktuukkan
Copy link
Owner

ktuukkan commented Dec 29, 2018

The websockets are not supported directly either but try extending the AbstractDataReader, which is now public, to implement a client that works similarly to the UDP reader, e.g. by buffering the socket messages in a queue and returning the head with each call to read() method.

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

No branches or pull requests

2 participants