How to Decode AIS Data with a SDR
The Automatic Identification System is a tracking system designed for maritime vessels, offering reliable and timely data exchange between ships and shore-based stations. AIS operates by continuously transmitting and receiving vessel-specific information, such as identity, position, course, speed, and navigational status. This information is shared with nearby vessels and coastal authorities, providing a comprehensive situational awareness picture. AIS can provide valuable insight into situations like collision avoidance, search & rescue operations, maritime traffic management, safety & piracy prevention, environmental monitoring & pollution control, fisheries management, and marine research and analysis.
How does AIS Work?
AIS operates by capturing your location and movements either through the ship’s GPS system or an internal sensor integrated into an AIS device. This data, along with programmable information from the AIS unit (such as the Maritime Mobile Service Identity (MMSI) number, vessel name, destination, and cargo type), is collected and transmitted periodically in the background. At the same time, it also receives AIS information from other vessels. The reception range of AIS can vary due to atmospheric signal propagation conditions, but on average, an AIS receiver is expected to achieve a reception radius of approximately 40 nautical miles.
Note:- To gain a deeper understanding of AIS technology, we invite you to watch our “Multiple Uses of AIS Technology” webinar as part of “The Ask an Elmer” series, where we engaged in an extensive conversation with field experts regarding the various applications of AIS technology.
AIS operates on two dedicated VHF channels:
- 161.975 MHz – Channel 87B (ship to ship)
- 162.025 MHz – Channel 88B (ship to shore)
Antenna Requirements for AIS
When it comes to selecting an appropriate antenna for receiving AIS signals with a SDR, several factors should be considered. Firstly, it is important that the antenna’s frequency range aligns with the AIS frequency band which is approximately 162 MHz. The antenna’s gain and radiation pattern are additionally crucial factors that influence its reception capabilities. In the case of AIS, where vessels are typically spread out, an omnidirectional antenna is generally suitable. Even a basic VHF whip antenna can produce satisfactory results depending on the location. If you are inclined towards a do-it-yourself approach, you can find instructions for constructing a collinear antenna specifically designed for AIS reception here [https://arundaleais.github.io/docs/ais/aerial.html]. Furthermore, antenna height and placement are also important for maximizing signal reception and minimizing interference.
AIS-catcher for Windows
There are quite a few ways to decode AIS, but AIS-catcher is free and open-source software that can be used to receive and decode AIS signals from both channels simultaneously. AIS-catcher is available for Windows, macOS, Linux, Raspberry Pi, & Android and it supports all major SDR devices. The latest release can be downloaded from its GitHub page.
Begin by visiting the GitHub [https://github.com/jvde-github/AIS-catcher] page’s releases section and obtain the latest pre-compiled binary archive for windows. It’s either AIS-catcher.x64.zip or AIS-catcher.x64.zip depending on your operating system. This archive contains all the necessary files for running the most up-to-date version of AIS catcher.
Once the download is complete, extract the files into a designated folder. AIS-catcher functions as a command line application with numerous additional options that can be included in the initial command. It is recommended to utilize a batch file for launching the application. A sample batch file named “start.bat” is already provided. To view its contents, simply open it with a text editor such as Notepad.
The default batch file is configured to output decoded messages to the “localhost” on Port 10110 via “-u 127.0.0.1 10110” switch, which can be used to plot vessels in programs like OpenCPN. However, in our case, we want to activate its built-in web server. To achieve this, add the parameter “-n8100” to the end of the command line in the batch file and save the changes. Now, double-clicking on the “start” batch file will open a terminal window and AIS-catcher will detect the connected SDR device and commence printing status logs in the terminal window.
Note :- Please note that additional configuration may be necessary depending on the specific SDR device you are using. It is highly recommended to refer to the developer’s wiki page [https://github.com/jvde-github/AIS-catcher#readme] for detailed information and guidance in this regard.
After a while you will start seeing a multitude of messages appearing in the terminal window. Now, launch your web browser and navigate to “localhost” on Port 8100 by typing “127.0.0.1:8100” on the address bar of the browser. This will grant access to the AIS-catcher’s built-in web server front end, which will display information such as received vessels, NMEA messages, total message count based on the channel, statistical data, and an aesthetically pleasing position map illustrating the locations of all detected ships. You can click on a specific ship and access further details, such as its name, MMSI ID, class, speed, size, destination and current route.
AIS-catcher for Android
AIS-catcher is also available for android and it can be downloaded directly from the playstore [https://play.google.com/store/apps/details?id=com.jvdegithub.aiscatcher&gl=NL]. In contrast to its desktop counterpart, the Android version of AIS-catcher requires a separate plotting application such as OpenCPN to display real-time vessel information on a map. AIS-catcher is responsible for receiving AIS signals, decoding them, and transmitting the data via a UDP connection. Simply click on the 3 dots located in the upper right-hand corner and make sure at least one UDP connection is active with a valid UDP port number. Also be sure to adjust Sample rate, AGC, Gain and Frequency correction values according to your specific SDR device.
Note :- The default setup of supported SDR devices already includes optimal sample rate values, allowing you to focus on experimenting with the Gain level and AGC to achieve the best results. If you are using an external LNA that requires power, remember to enable the bias-tee option.
Then download and install OpenCPN
[https://play.google.com/store/apps/details?id=org.opencpn.opencpn_free&hl=en&gl=US] from the Google Play Store. Once the installation is complete, open the application and locate the settings icon in the upper left-hand corner. Select the “Connections” tab and proceed to add a new data connection. Choose the connection type as “Network,” select “UDP” as the protocol, and enter the data port that you previously set in AIS-catcher. Finally, save the settings by clicking on “Apply” and “OK.”
Once all configurations are set up accurately, you can expect to see vessels appearing on the map shortly. In the following instance, a Samsung Galaxy Tab S7+ was utilized along with an Airspy R2 connected to a basic telescopic whip antenna.
In conclusion, receiving and decoding AIS signals can be an interesting first project to do with a SDR for those who live near the coast line. By following the steps outlined in this article, you can successfully set up your SDR to capture AIS transmissions and decode data about different types of vessels, their positions, movements, and other relevant information. Remember to choose a suitable antenna, configure the AIS-catcher correctly, and ensure proper signal reception. Bon voyage, on your AIS journey!
Written by Dilusha Samarasekara – Associate Member, RSSL
One thought on "How to Decode AIS Data with a SDR"