AIS Dispatcher is an AIS data forwarding utility which provides the following features:
- receives AIS data via UDP stream, TCP connection or serial interface
- performs CRC check and removes duplicated NMEA messages
- calculates overall statistics and detailed message statistics
- performs downsampling of the NMEA stream
- dispatches the NMEA stream via UDP up to 12 destinations (unlimited for Linux version)
AIS Dispatcher performs downsampling of the incoming data feed before sending data to the destination hosts. Downsampling reduces outgoing traffic several times! In particular, for each AIS target (MMSI number) a single set of data must be forwarded to the destination hosts inside a predefined time window. The following picture graphically represents downsampling function:
The time window can be configured between 0 and 300 seconds. 0 seconds means no downsampling. Downsampling reduces the outgoing traffic several times. Downsampling affects AIS messages 1,2,3,18,19 only!
Example of use
The following example illustrates how AIS Dispatcher can forward NMEA messages from a single AIS receiver to AISHub.Net, other destination and local ShipPlotter running on the same machine.
RAW AIS DATA SAMPLE
We receive a lot of questions by software developers who need some raw AIS data to test their applications.
Here you can download a sample with raw AIS data from AISHub. The file contains ~85K messages (3 minute live AISHub feed).
AIS Sample Download
AIS Dispatcher - Windows
- improved serial port data reception
- improved signal decoding via sound card
Installation
Download AISDispatcher ZIP file and unzip it in a separate folder.
Start up
After the first start, the program runs with default configuration. You can place a shortcut to aisDispatcher.exe on your desktop or into the "Startup" folder for an automatic startup.
Configuration
The configuration dialog is displayed by pressing “Configuration” button on the main window. The “Configuration” dialog contains four configuration panels – "Input", "Output", "Google Earth"and "Miscellaneous".
"INPUT" Configuration
INPUT MODE
You can choose one of the following types of data input:
TCP | AISDispatcher creates TCP connection to the remote data source |
UDP | AISDispatcher listens on the specified port |
Serial | AISDispatcher receives data from a local serial port (or USB serial device) |
- Remote IP – IP address (or domain name) of the remote data source (example: IP 192.168.1.102)
- Remote port – TCP port of the remote data source (example: port 4001)
- Local port – port on the local Windows machine, where AISDispatcher listens for incoming UDP packets (example: udp port 5000)
- COM port – serial port name (example: COM1)
- Baud rate – baud rate selection (example: 38400).
Serial input uses 8,N,1 serial settings, according to NMEA specification.
"OUTPUT" CONFIGURATION
UDP Output
Downsampling interval | time window of downsampling algorithm. For more details see: AIS Dispatcher – Description |
Destinations | up to 12 destination IP addresses/ports. AISDispatcher forwards AIS data to all configured and enabled destinations. In our example, there are two destinations. |
Filters | filtering by polygon and message types may be used for each destination |
"GOOGLE EARTH" CONFIGURATION
Delete old vessels
Expriation time – AIS Dispatcher keeps list of all received vessels since the startup. Each minute, the application purges the list and removes the vessels with last packet timestamp older than the defined “expiration time”.
HTTP Server configuration
Host / Port – AIS Dispatcher listens for network connections from Google Earth clients on the
specified host / port. When host is “0.0.0.0″ (by default), the application listens on all network interfaces.
Enable HTTP server – enable/disable the HTTP server
Allow localhost only - disables connection to all external interfaces. AIS Dispatcher listens for
connections only from Google Earth clients started on the user’s PC.
KML / KMZ export
Enable – enable/disable the regular export of KML/KMZ file into the local hard drive. AISDispatcher
saves the file in its installation directory, “kml_export” folder. The file is named “aisDispatcherSnapshot.kml” or
“aisDispatcherSnapshot.kmz”.
Export interval – time interval between sequential KML/KMZ exports
Miscellaneous
Use ZIP compression - when ZIP compression is enabled, AISDispatcher generates KMZ instead of KML file
format. In this case, the application consumes more CPU time, but reduces the network traffic several times. KMZ
format also consumes more CPU time by the Google Earth client.
Show vessel names - displays all vessels names.
Delete old vessels
Expriation time – AIS Dispatcher keeps list of all received vessels since the startup. Each minute, the application purges the list and removes the vessels with last packet timestamp older than the defined “expiration time”.
HTTP Server configuration
Host / Port – AIS Dispatcher listens for network connections from Google Earth clients on the
specified host / port. When host is “0.0.0.0″ (by default), the application listens on all network interfaces.
Enable HTTP server – enable/disable the HTTP server
Allow localhost only - disables connection to all external interfaces. AIS Dispatcher listens for
connections only from Google Earth clients started on the user’s PC.
KML / KMZ export
Enable – enable/disable the regular export of KML/KMZ file into the local hard drive. AISDispatcher
saves the file in its installation directory, “kml_export” folder. The file is named “aisDispatcherSnapshot.kml” or
“aisDispatcherSnapshot.kmz”.
Export interval – time interval between sequential KML/KMZ exports
Miscellaneous
Use ZIP compression - when ZIP compression is enabled, AISDispatcher generates KMZ instead of KML
file
format. In this case, the application consumes more CPU time, but reduces the network traffic several times. KMZ
format also consumes more CPU time by the Google Earth client.
Show vessel names - displays all vessels names.
"MISCELLANEOUS" CONFIGURATION
Auto connect on startup | automatically creates connection after the start of the application |
Minimize to system tray on close | when pressing ALt+F4 or “X” button, the application is minimized to the system tray. It can be closed by clicking on the system tray with the right mouse button and selecting “Exit”. |
Start application minimized | after startup, the application is minimized to the system tray |
Show system tray hint | displays hint with the current status when mouse cursor hovers over the icon in the system tray |
Dispatch VDM/VDO messages only | filters only VDM/VDO messages from AIS sources. If the filter is off, the AISDispatcher will forward all other NMEA messages (like GPS devices for example). |
Don’t dispatch channel C | filters AIS channel C (secure AIS) |
MAIN WINDOW
AIS Dispatcher’s main window contains connection controls and detailed statistics of the input data feed.
Input section
Mode | current input mode (TCP,UDP or serial) and connection parameters |
Status | current connection status |
“Start”/”Stop” buttons | connection control |
Input statistics
Message counters and byte counters of the incoming data feed. For more information about the meaning of the fields, check the AIS specification.
Input statistics (by AIS message type 1..24)
There are 24 different types of AIS messages. This panel displays separate message counter for each message type. Additional details about each message type are displayed by hovering with the mouse over the counter.
Input statistics (by AIS message type 1..24)
Displays last received AIS messages
"Clear" button
Clears all counter
"Configuration" button
Displays configuration window described in the previous chapter
Output statistics
In/Out ratio - ratio between input and output data counters. This parameter shows the efficiency of
the downsampling algorithm.
Bandwidth (kB/s) – average output bandwidth in Kilobytes per Second
Distinct vessels – current number of vessels kept in AIS Dispatcher memory buffer.
AIS Dispatcher - Linux
AIS Dispatcher for Linux supports wide range of Linux distributions on x86_64 / ARM architectures (including Raspberry Pi).Installation
wget https://www.aishub.net/downloads/dispatcher/install_dispatcher chmod 755 install_dispatcher sudo ./install_dispatcher
Opening AIS Dispatcher configuration
Start your browser and open URL:
http://IPADDRESS:8080 (change IPADDRESS with your IP address)
Default web login credentials are:
- Username: admin
- Password: admin
Configuring AIS Dispatcher
After login the web page displays the current status of your AIS station:
To configure your AIS Dispatcher select “Configuration” from the left panel.
There are 3 sections in the configuration panel:
- Input – configuration of connection to your AIS receiver/data source.
- Output – configuration of the destinations where AIS data will be forwarded to
- Settings – additional settings and enable/disable of AIS Dispatcher
INPUT
AIS Dispatcher supports 3 input options:
- Serial input (AIS receivers connected via serial/USB interface)38400,8,N,1 settings are applied to the serial interface by default
“View devices” button displays all available serial devices in your Raspberry Pi.
You can easily select the device where your AIS receiver is connected by clicking on corresponding
“Select” button (preferably use selection “By ID” if you don’t have two devices with same ID)
WARNING Mаny Raspberry Pi users, who are using serial connection (or AIS shield), have troubles because by default Linux console is enabled on this serial port. If you are using Raspberry OS you should disable the Linux console, follow the instructions on this link
- TCP Client (AIS Dispatcher creates TCP connection to your AIS receiver/data source)
- TCP Server (your AIS data source creates TCP connection to your RPi)
- UDP Server (AIS Dispatcher listens for incoming UDP packets)
OUTPUT
Output section contains all destinations where your data will be forwarded to.
Current version supports UDP data streaming to 1 or more destination IP addresses / UDP ports.
By default, AIS Dispatcher streams data to AISHub anonymous port and your data is displayed at VesselFinder
Settings
- Inactivity timeout – Restarts TCP connection if no AIS messages have been received for more than specified time interval (in seconds)
- Reconnect timeout – Time interval (in seconds) between two sequential connection attempts
- Downsampling time – Reduces outgoing traffic by transmitting only 1 position report per ship in the specified time frame (in seconds from 0 to 60)
- Log verbosity – Verbosity of log messages (errors only, errors+connection status, errors + connection status + debug info)
- Duplicates removal – Reduces outgoing traffic by removal of duplicated AIS messages
- Tag – Adds NMEA v4.10 tags in the beginning of output NMEA sentences
- Non-VDM – Dispatches all non-VDM (non-AIS) messages (for example GPS messages)
- Enabled – Start / Stop AIS Dispatcher
Map
If the input configuration is OK it is time to click on Map menu and start having fun with your AIS coverage.
AIS Dispatcher - Linux / Mac OS
1.2
15-May-2015
- output filters by message type
- "TCP server" input's
SYNOPSIS 1. TCP client input: aisdispatcher -t -h -p -H ,,... [-x ] [-y ] [-D ] [-v] 2. UDP input: aisdispatcher -u -h -p -H ,,... [-D ] [-v] 3. Serial input: aisdispatcher -r -d -s -H ,,... [-D ] [-v] 4. input: aisdispatcher -i -H ,,... [-D ] [-v]
DESCRIPTION
AIS Dispatcher is an AIS data forwarding utility which provides the following features:
- receives AIS data via UDP stream or TCP connection
- performs CRC check and removes duplicated NMEA messages
- performs downsampling of the NMEA stream
- dispatches UDP NMEA streams to unlimited number of destination hosts
OPTIONS
-t | TCP client input mode |
-u | UDP input mode |
-r | Serial input mode |
-i | input mode |
-h | TCP server host (in TCP input mode)UDP bind host (in UDP input mode 0.0.0.0 means all interfaces) |
-p | TCP server port (in TCP input mode)UDP listen port (in UDP input mode) |
-d | Serial device alias (ex. /dev/ttyS0) |
-s | Serial device baud rate |
-H | Destination(s) ,… |
-x | Reconnect timeout (time interval between TCP connection attempts, 10 seconds by default) |
-y | Data timeout (automatic TCP reconnects, if there are no data for the specified time, 300 seconds by default) |
-D | Downsampling time (0 seconds = no downsampling by default. Maximum=300 seconds) |
-v | Dispatch VDM messages only (dispatch all messages by default) |
-g | Show NMEA dump |
-G | Turn debug on |
EXAMPLES
TCP example | aisdispatcher -t -h data.aishub.net -p 1234 -H 127.0.0.1:5000,192.168.1.5:5001 -x10 -y60 |
UDP example | aisdispatcher -u -h 0.0.0.0 -p 5000 -H data.aishub.net:1235 -D30 -v |
Serial example | aisdispatcher -r -d /dev/ttyS0 -s 38400 -H 192.168.1.5:5001 |
stdin example | cat nmea.log | aisdispatcher -i -H localhost:1234 |