schwehr / libais

C++ decoder for Automatic Identification System for tracking ships and decoding maritime information
Other
218 stars 97 forks source link

NmeaQueue docstring example and actual behavior differs #153

Open rutsky opened 8 years ago

rutsky commented 8 years ago

Last example "# TAG Block NMEA AIS VDM." specified in NmeaQueue docstring works not at specified in the docstring:

import ais.nmea_queue

# Example from NmeaQueue docstring
q = ais.nmea_queue.NmeaQueue()
q.put('\g:1-3-144865,n:325372,s:r11CSDO1,c:1428944580*6C\!AIVDM,2,1,9,A,55MkD8000001L@7?37L4AHDqAE8F0Pu8p8huLE8t28P,0*1E')
q.put('\g:2-3-144865,n:325373*2D\!AIVDM,2,2,9,A,666v<04ThC`12AAkp0hH88888880,2*7A')

res = q.GetOrNone()
assert res is not None, "Expected object (according to NmeaQueue docstring)"