-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement best effort decoding for type 1,2,3 when there are extra bi…
…ts present
- Loading branch information
1 parent
96c6dcf
commit 5884afc
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import ais as libais | ||
from ais import DecodeError | ||
|
||
|
||
def ais_1_2_3_decode(body, pad): | ||
try: | ||
return libais.decode(body[:28], 0) | ||
except DecodeError as e: | ||
raise DecodeError(f'TYPE 1-2-3 LIBAIS ERR: {str(e)}') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
\s:rMT4097,t:ais-listener,c:1697012399*7E\!AIVDM,1,1,,A,13UuUj0P00QgDCLEiGAcOOwl2<0Igw;,0*28 | ||
\s:rMT1200,t:ais-listener,c:1697012048*78\!AIVDM,1,1,,A,33lP4T5P00QJoU6Fd1<v4?v>2D`Jal<,0*7F | ||
\s:rMT1200,t:ais-listener,c:1697011998*7F\!AIVDM,1,1,,A,13R3iq00001LhHDFVNd@RC@R0<0FPF=,0*6C | ||
\s:rMT6030,t:ais-listener,c:1697011876*78\!AIVDM,1,1,,B,15Ca7j002HQer4PClUD<1qbH089PRn4,0*07 | ||
\s:rMT6168,t:ais-listener,c:1697014351*7F\!AIVDM,1,1,,B,16eg3D1P00RT5kHCfSje>Ovr:`AhPc=,0*57 | ||
\s:rMT6030,t:ais-listener,c:1697014102*77\!AIVDM,1,1,,A,13R3=u3P00QfIwhCt;09V?v`0530Li7,0*61 | ||
\s:rMT1200,t:ais-listener,c:1697011340*70\!AIVDM,1,1,,B,13VOUT002W1KM1hFbSbcrITb0<1Muw>,0*03 | ||
\s:rMT6030,t:ais-listener,c:1717190215*76\!AIVDM,1,1,,A,144d5;0uiHQjSVjC6w:iL1Ab26a05d4,0*72 | ||
\s:rMT6030,t:ais-listener,c:1717190199*71\!AIVDM,1,1,,A,13lHkf001C1o?`HC3=Oc@8w408Cos:<,0*3D | ||
\s:rMT6030,t:ais-listener,c:1717190200*72\!AIVDM,1,1,,B,19@9=p0P1<1mUP`C7ttkBOw800RqWe=,0*3C | ||
\s:rMT1200,t:ais-listener,c:1717190111*77\!AIVDM,1,1,,B,34i:=V50001K=nbFbsWeH42D2000j0<,0*5F | ||
\s:rMT1200,t:ais-listener,c:1717189944*77\!AIVDM,1,1,,B,33TVdn1P01QK>R`Fc78v4?vh2DlbI03,0*20 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters