lsix / libais

C++ decoder for Automatic Identification System for tracking ships and decoding maritime information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

image

image

image

image

Library for decoding maritime Automatic Identification System messages.

See Also

Automatic Identification System

Other open source AIS projects:

Building

Building with Python

$ python setup.py build
$ python setup.py install

Testing with Python

$ virtualenv ve
$ source ve/bin/activate
$ python setup.py test

Building with CMake

$ cmake .
$ make

Building with legacy Makefile

$ make -f Makefile-custom test

Usage

There are two interfaces to libais, one high-level iterator based one and a low-level fast C++ only one. The iterator based interface is accessed the following way:

To use the low-level C++ interface directly, you need to handle multi-line messages and padding yourself:

There is also support for converting parsed messages to the structure output by GPSD / gpsdecode. For full compatibility, you have to write the resulting message dictionaries to a file with json.dump() and add a newline after each message.

AIS Specification Documents

  • ITU-1371, ITU-1371-{1,2,3,4]
  • e-Navigation
  • IMO Circ 236
  • IMO Circ 289
  • EU RIS

Developing

The C++ code was switched to the Google style in November, 2012. Indenting should be by 2 spaces.

http://google-styleguide.googlecode.com/svn/trunk/cpplint/

$ git clone https://github.com/schwehr/libais
$ cd libais
$ virtualenv ve
$ source ve/bin/activate
$ pip install -e .[tests]
$ python setup.py test
$ py.test --cov=ais --cov-report term-missing

or

$ git clone https://github.com/schwehr/libais
$ cd libais
$ virtualenv ve
$ source ve/bin/activate
$ pip install -e .[test]
$ python setup.py develop
$ python setup.py test
$ py.test --cov=ais --cov-report term-missing

About

C++ decoder for Automatic Identification System for tracking ships and decoding maritime information

License:Other


Languages

Language:C++ 63.7%Language:Python 32.9%Language:Makefile 1.8%Language:M4 1.4%Language:CMake 0.1%Language:Shell 0.1%