自动识别系统解码-船舶跟踪

libais的Python项目详细描述


https://travis-ci.org/schwehr/libais.svg?branch=masterhttps://scan.coverity.com/projects/5519/badge.svghttps://codeclimate.com/github/schwehr/libais/badges/gpa.svghttps://badge.fury.io/py/libais.svg

用于解码海事自动识别系统信息的库。

建筑

用python构建

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

使用python进行测试

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

使用cmake

构建
$ cmake .
$ make

使用遗留makefile构建

$ make -f Makefile-custom test

用法

libais有两个接口,一个是基于高级迭代器的接口 和一个低级别的快速C++只有一个。基于迭代器的接口是 按以下方式访问:

importais.streamwithopen("file.nmea")asf:formsginais.stream.decode(f):printmsg
< >直接使用低级C++接口,需要处理多行消息和填充自己:

importaisais.decode('15PIIv7P00D5i9HNn2Q3G?wB0t0I',0)ais.decode('402u=TiuaA000r5UJ`H4`?7000S:',0)ais.decode('55NBjP01mtGIL@CW;SM<D60P5Ld000000000000P0`<3557l0<50@kk@K5h@00000000000',2)

还支持将解析的消息转换为结构 由gpsd/gpsdecode输出。为了完全兼容,您必须编写 生成的消息字典将使用json.dump()和add 每条消息后都有一个换行符。

importais.streamimportjsonimportais.compatibility.gpsdwithopen("infile.nmea")asinf:withopen("outfile.gpsd")asoutf:formsginais.stream.decode(f):gpsdmsg=ais.compatibility.gpsd.mangle(msg)json.dump(gpsdmsg,outf)outf.write("\n")

AIS规范文件

  • ITU-1371,ITU-1371-{1,2,3,4]
  • e-Navigation
  • IMO CIRC 236
  • IMO CIRC 289
  • 欧盟RIS

发展中

< > C++代码在2012年11月被切换到谷歌风格。 缩进应为2个空格。

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

$ 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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Swing JTable在前一行的函数中更改一行的背景色   java Hashmap:当我们放置相同的键时,map是如何工作的   使用java打开完整网页的url   java如何安全地将用户GUI输入数据传递给SwingWorker并使用该数据?   java地理记录器:无法在getFromLocation()中传递LatLng   java netty ChannelInboundHandlerAdapter以约1500字节的速度剪切帧   contextmenu操作后未更新java datatable   将AES加密从Java移植到Objective   Slick2D中的java跳跃难度   FLEX java。主路径反斜杠   做jframe。Java1.6中的setType(Window.Type.POPUP)   java无法生成实体管理器工厂   Java XML分割行间FRC   创建名为“ModelAccess”的bean时发生java错误,自动连线依赖项的注入失败;无法自动连线字段   java会话servlet在下拉菜单jsp上不起作用   java管理与maven相关的新版本和非PO库