canboat / canboatjs

Native javascript NMEA 2000 decoder and encoder
Apache License 2.0
98 stars 41 forks source link

PGN 127489 #192

Closed fencer closed 2 years ago

fencer commented 2 years ago

I was analysing the incoming data from Mercury VesselView link and noticed that the PGN 127489 was not being decoded (using analyser). Here is some samples

1556284840920;A;2019-04-26T13:20:40.920Z,2,127489,8,255,8,00,1a,00,ff,ff,ff,ff,8b
1556284840921;A;2019-04-26T13:20:40.921Z,2,127489,8,255,8,01,79,a5,04,0c,00,e4,a5
1556284840922;A;2019-04-26T13:20:40.921Z,2,127489,8,255,8,02,0c,00,fb,00,ff,ff,7f
sbender9 commented 2 years ago

that PGN is definitely supported. : https://github.com/canboat/canboat/blob/bf2b56cd1763e9a6258b60ea5752a0eacd890c9a/analyzer/pgn.h#L2876

sbender9 commented 2 years ago

2019-04-26T13:20:40.920Z,2,127489,8,255,8,00,1a,00,ff,ff,ff,ff,8b

0x1a means there should be 26 bytes, but there are only 20 bytes in your example data.

fencer commented 2 years ago

that PGN is definitely supported. : https://github.com/canboat/canboat/blob/bf2b56cd1763e9a6258b60ea5752a0eacd890c9a/analyzer/pgn.h#L2876

Yes in fact I tried out the sentences in the tests and can decode them using analyser but cannot not any of the samples I took from the log image i've filtered out the pgns to include only 127489 here : pgns.csv

sbender9 commented 2 years ago

Either your device is not forming the PGNs correctly, or you're not getting all the frames in your example data above.

1556284840920;A;2019-04-26T13:20:40.920Z,2,127489,8,255,8,00,1a,00,ff,ff,ff,ff,8b 1556284840921;A;2019-04-26T13:20:40.921Z,2,127489,8,255,8,01,79,a5,04,0c,00,e4,a5 1556284840922;A;2019-04-26T13:20:40.921Z,2,127489,8,255,8,02,0c,00,fb,00,ff,ff,7f`

You sure there's not another 4th frame in your data?

sbender9 commented 2 years ago

You also need to send all the frames to analyzer at the same time. You can't send them separately.

Note that those are not three different instances of the pgn sent. There are multiple lines for each message.