AIS – Decoder

AIS Receiver at Università Politenica delle Marche

DII – Information Engineering Department – Telecommunication System Team

Introduction

AIS system (stands for Automatic Identification System ) was developed to increase safety at sea. Ships broadcast their position automatically on a periodical time base and all vessels equipped with an AIS receiver or transponder, are able to plot other ship position, course and other information.

Data are transmitted on VHF Maritime band using GMSK modulation scheme, and are easy to receive using a special purpose equipment or a common marine RTX with an external data demodulator (a PC and a soundcard will work great).

We are involved in AIS data receiving and analysis in order to carry out some scientific research in the field of electromagnetic wave propagation over sea water. We aim to find a correlation between distance of received ships and propagation in the 2m hamradio band. This is only the first “step” of a biggest project aimed to extract a model of propagation from data provided by the AIS system and from a beacon receiver

If you have an question, please contact us on: this address

Tecnical Information

AIS Receiver has been provided from Marine Traffic in order to extend coverage of the network on Ancona area.

Antenna system is installed on the top of the “tower” of Faculty of Engineering , at 205 meters above sea level. The location is very good for wireless installation as there are no obstacles for many kilometers all around the tower.

Decoding Engine

Data provided from AIS are in the form of an ASCII string like following: !AIVDM,1,1,,B,13cita001N0uC7\<hva8qqaif0\<0@,0*1f <=”” p=””>

AIS protocol decoder has been developed using php language, in order to make it really “platform independent”. PHP language provides a lot of functions for string manipulation, which are very useful in the decoding process.

Many different message types are decoded using our engine, out effort is to add even more decoding function to the software. Information retrived from protocol’s payload are displayed on screen and stored in a mysql database for further “off-line” analysis.

Due to the large number of packets received, data are inserted in mysql tables according to following rule: we store information about a particular MMSI only if the last update is older than 5 minutes. In this way we can “decimate” information stored on table without loosing too much information: ship speed is so low that we can tolerate a low sampling period

Further processing of data stored is done using a bash/php script which is run every minute. Data processed from the script are fed to MRTG system which takes care of displaying results.

Following graphs are generated (time-window is 1 hour):

  • Max distance of received signal
  • Average distance of ships (as calculated from MRTG)
  • Azimut of the received signal
  • Average bearing of received signals
  • Number of different MMSI received in 1 hour
  • Number of different MMSI received whose distance exceeds estimated “radio horizon”
  • Number of fixed station received

Accessing data

Decoded data can be accessed via AIS web site. Registration is mandatory for statistical purposes only. Email addresses will not be published. Occasionally we may send you a newsletter, to inform about site or code improvements.

Some screenshots from the AIS site:

ais_01

ais_02

Updates

Code will be occasionally updated in order to fix major bugs or reflect some changes in the protocol.  Changelog follows.

22/04/2016: fixed php dispatcher. Avoid replicating outgoing packets.
07/02/2022: data sets are made available for download in a section of this site.

Obtaining the Code

Please don’t waste your time re-inventing the wheel. Access our code (Released as GPL v3) and use it for your needs. Feel free to help us developing new code, adding more functionalities and making it even faster.

Due to google code shutdown, the project is now hosted at this site.

Code is released under the GNU GPLv3 license and can be obtained for free, please download it from this link, on GITHUB.

Please feel free to contribute to the project, improving code. Contact us for further information!

Some statistics!

AnnoTotal RowsDistinct MMSIDistinct Type 1-2-3Distinct Type 4
201226636183188298531
201344669694581366069
201471907334906431443
201585325465644475161
201678260745481462361
201764015315584451160
201852253135203400770
2019539814055914385134
202042650144655371769
202142603375578421560
202250406555910443153
202343787705640406356
TOTALE64869382

10 years celebration!
On March 21st 2012, our AIS station, located at Università Politecnica delle Marche began to decode messages from ships crossing the Adriatic sea in the Ancona region. At the same time, our partnership with MarineTraffic began, who provided us with a receiver that still works like a charm.
Some facts about our AIS station:
– our station ID is 82 ;
– dataset is huge: 50+ million rows;
– 4000+ distinct MMSI each year;
– record coverage of 550km;

Year 2012
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2013
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2014
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2015
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2016
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2017
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2018
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2019
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2020
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2021
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2022
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)

Year 2023
Only Fixed Station (SQL)
Data (7z)
Complete Dataset (tar)