View AIS- Data with QT?

耗尽温柔 提交于 2019-12-12 02:52:26

问题


anyone know how i can get the Data from a AIS site and view they in a QT Gui? Can i save them in a SQL database ? I would have the data from this site : http://www.aishub.net/

AIS : The Automatic Identification System (AIS) is an automatic tracking system used on ships and by vessel traffic services (VTS) for identifying and locating vessels by electronically exchanging data with other nearby ships, AIS base stations, and satellites. When satellites are used to detect AIS signatures then the term Satellite-AIS (S-AIS) is used. AIS information supplements marine radar, which continues to be the primary method of collision avoidance for water transport.


回答1:


You should register account at http://www.aishub.net/ and subscribe to get access for their API described here. At desktop side you should build Qt application, that will not frequently then every minute call their API URL with your credentials using QNetworkRequest, retrieve QNetworkReply result output (this will be XML or JSON). And then parse the XML or JSON with Qt build-in classes for processing XML or JSON documents. After parsing you should display processed data in your preferred way, for example, sortable table view, or save in database, whatever.




回答2:


This is not entirely a coding question.. you should found out how to get the data from the site on your own.. But anyway - there's a XML API on that site

Qt supports XML nicely.. you can store the xml if you want in file or in sqllite database, or just parse it an show it.

You can use some view widget to show the parsed data - something like QListView, QTableView ..



来源:https://stackoverflow.com/questions/25989358/view-ais-data-with-qt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!