You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README
+44-14Lines changed: 44 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ All Rights Reserved
4
4
See LICENSE for licensing information
5
5
6
6
7
-
This is the first public release of the AIS Parser SDK. I have re-licensed it under the BSD license. See LICENSE for details. This code will now be available at https://github.com/bcl/aisparser/
8
-
7
+
NOTE: This codebase is now fairly old, I personally do not use it for anything
8
+
but am willing to accept pull requests with bugfixes and reasonably targeted
9
+
changes.
9
10
10
11
'C' Version:
11
12
AIS Parser SDK source is in ./c/src/
@@ -22,15 +23,20 @@ Linux Python is in ./python/linux/
22
23
OSX Python is in ./python/osx/
23
24
Win32 Python is in ./python/win32/
24
25
25
-
I have removed the pre-compiled Python versions because they were out of date. You can rebuild them on your system by running the buildit script in their respective directories.
26
+
I have removed the pre-compiled Python versions because they were out of date.
27
+
You can rebuild them on your system by running the buildit script in their
28
+
respective directories.
26
29
27
30
Win32 DLL built using Visual Studio 6 is in ./dll/aisparser
28
31
Visual Basic 6 example is in ./dll/examples
29
-
This version does not include a pre-compiled DLL. I no longer support Windows as a development environment so you will need to build your own.
32
+
33
+
This version does not include a pre-compiled DLL. I no longer support Windows
34
+
as a development environment so you will need to build your own.
30
35
31
36
32
37
AIS Parser SDK source
33
38
---------------------
39
+
34
40
The core parser consists of 12 files, 6 .c files and their associated .h files:
35
41
36
42
nmea.c/nmea.h - functions for processing NMEA 0183 sentences.
@@ -43,6 +49,7 @@ access.c/access.h - helper functions for python and Visual Basic
43
49
44
50
St. Lawrence Seaway
45
51
-------------------
52
+
46
53
The parser code for St. Lawrence seaway binary messages is in the seaway.c file. The
47
54
seawayX_X messages have been tested against the examples in the Seaway documentation.
48
55
the pawssX_X messages have not been tested.
@@ -55,7 +62,9 @@ The St. Lawrence Seaway message specification is in ./c/docs/StLawrence.pdf
55
62
56
63
IMO Binary Messages
57
64
-------------------
58
-
The parser code for IMO binary messages is in the imo.c and imo.h files. The imoX_X messages have not yet been tested against real data.
65
+
66
+
The parser code for IMO binary messages is in the imo.c and imo.h files. The
67
+
imoX_X messages have not yet been tested against real data.
59
68
60
69
If someone has access to live IMO Binary messages that I could use in testing, I would
61
70
appreciate it if you would forward them to me at bcl@brianlane.com
@@ -77,7 +86,10 @@ parses messages with position information and outputs a JSON (JavaScript)
77
86
data structure for use with the Google Maps demo webpage. There is also a
78
87
simple XML version and a text output version.
79
88
80
-
Parsing St. Lawrence Seaway and IMO binary messages are more complicated than the other messages. You must first parse the mssage 8 or 6, and then pass its data payload to the appropriate seaway/imo parser function to extract all of the information.
89
+
Parsing St. Lawrence Seaway and IMO binary messages are more complicated than
90
+
the other messages. You must first parse the message 8 or 6, and then pass its
91
+
data payload to the appropriate seaway/imo parser function to extract all of
92
+
the information.
81
93
82
94
83
95
Python
@@ -87,10 +99,16 @@ around the SDK's 'c' source. Structures are implemented as classes in
87
99
Python, and all of the SDK's functions are exposed via the Python interface.
88
100
89
101
Check the ./python/example/ directory for examples of how to use the Python
90
-
module. There is a wxPython GUI application that will read a log file and display the details of the messages. There is also last_ais.py which I use to generate my dynamic
91
-
email signature, capturing the latest ship info from my local receiver.
102
+
module. There is a wxPython GUI application that will read a log file and
103
+
display the details of the messages. There is also last_ais.py which I use to
104
+
generate my dynamic email signature, capturing the latest ship info from my
105
+
local receiver.
92
106
93
-
The runme.py example in the swig directory can also be used. It has an example of parsing a Seaway 1.3 message. In python the struct arrays are not properly understood by the SWIG wrapper, so the helper function that matches the message must be used to first extract the array element before Python can operate on it.
107
+
The runme.py example in the swig directory can also be used. It has an example
108
+
of parsing a Seaway 1.3 message. In python the struct arrays are not properly
109
+
understood by the SWIG wrapper, so the helper function that matches the message
110
+
must be used to first extract the array element before Python can operate on
111
+
it.
94
112
95
113
Package can be directly pip installed with recent setuptools:
96
114
@@ -100,18 +118,30 @@ Package can be directly pip installed with recent setuptools:
100
118
101
119
Windows DLL
102
120
-----------
121
+
103
122
There is a Windows DLL, including source, in ./dll/aisparser
104
-
It was compiled using Visual Studio 6, and does not work with .NET or any of the new Visual tools that I am aware of. There is an example VB6 application in the ./dll/examples directory.
105
123
106
-
The Visual Basic example form code show how to use all of the normal parsing functions. I have attempted to add parsing of the IMO and St. Lawrence Seaway messages to it, including adding helper functions (which are also used by python), but I have been unable to convince Visual Basic to correctly recognize the data structures. So, for now, parsing all of the normal AIS messages works fine in VB6, but IMO and Seaway parsing doesn't work.
124
+
It was compiled using Visual Studio 6, and does not work with .NET or any of
125
+
the new Visual tools that I am aware of. There is an example VB6 application in
126
+
the ./dll/examples directory.
127
+
128
+
The Visual Basic example form code show how to use all of the normal parsing
129
+
functions. I have attempted to add parsing of the IMO and St. Lawrence Seaway
130
+
messages to it, including adding helper functions (which are also used by
131
+
python), but I have been unable to convince Visual Basic to correctly recognize
132
+
the data structures. So, for now, parsing all of the normal AIS messages works
133
+
fine in VB6, but IMO and Seaway parsing doesn't work.
107
134
108
135
109
136
Delphi
110
137
------
111
-
Thanks to Chris Krohn for allowing me to include his Delphi port of the parser. This does not include the St. Lawrence Seaway parser code. It can be found in ./contrib/AISParser.pas
112
138
139
+
Thanks to Chris Krohn for allowing me to include his Delphi port of the parser.
140
+
This does not include the St. Lawrence Seaway parser code. It can be found in
141
+
./contrib/AISParser.pas
113
142
114
-
If you have any comments, questions, problems, etc. Please contact me and I'll get back to you as soon as I can. I appreciate feedback of any kind.
115
143
116
-
email - bcl@brianlane.com
144
+
If you have any comments, questions, problems, etc. Please contact me and I'll
145
+
get back to you as soon as I can. I appreciate feedback of any kind.
0 commit comments