dma-ais / AisLib

DMA AisLib - Java library for handling AIS messages
Other
169 stars 98 forks source link

Out of sequence Error #66

Closed eironside closed 4 years ago

eironside commented 4 years ago

Can someone tell me why I'm getting a sentence out of order error for the following messages?? This error happens on about 10% of my multi-line messages, and appears to be random.

Error is at dk.dma.ais.sentence.EncapsulatedSentence.baseParse(EncapsulatedSentence.java:98) (sorry, markup is affecting the strings, please see the attached text file)

multiline-errors.txt

Failed to parse AIS message: [!AIVDM,2,1,2,B,5815Lcp2DqaeKL7;O;45<j1=Tm0PtqV222222216ChPF:5oA0N5Dp40m888,0\*08, !AIVDM,2,2,6,B,p0kk3k8880,261] dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDM,2,2,6,B,p0kk3k`8880,2\61

Failed to parse AIS message: [!AIVDO,2,1,3,B,5EAP2F000000h5FT4MD4MD6222222222222220m0h:32000000<`0@0000,0*69, !AIVDO,2,2,4,B,88888888880,2*21] dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,4,B,88888888880,2*21

Failed to parse AIS message: [!AIVDO,2,1,2,B,5EATk202=WLC222222222222221I<P:66400050UCRiDRCQs,0*60, !AIVDO,2,2,5,A,88888888880,2*23] dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,5,A,88888888880,2*23

Failed to parse AIS message: [!AIVDO,2,1,0,B,5C9QRdP2>MRL@@tc:21HDL60ITpDr2222222221702D0G5eC0>l0@m0`8888,039, !AIVDO,2,2,2,B,@PC0ShH8880,20F] dk.dma.ais.sentence.SentenceException: Out of sequence sentence: !AIVDO,2,2,2,B,@PC0ShH8880,2*0F

eironside commented 4 years ago

Never mind. wasn't checking the sequence number before sending messages off to be parsed.