Skip to content

Running multiple receivers at one or more stations

Run more than one receiver from one AIS-catcher. Receivers in one place are one station, receivers elsewhere are stations of their own, each with its range and figures, and the ships they hear together form one picture.

Connecting your station to other tools, part 1 · 6 minutes to read

A chart of the Suffolk coast with two stations, Harwich and Orford, and ten ships at sea, each linked to the station or stations that hear it.

The example: two stations and the ten ships between them, three of them in reach of both antennas; each station counts what it hears, and the map shows them all.

One antenna sees what its horizon allows. A second one, a few miles up the coast or on the other side of a hill, fills in what the first misses. AIS-catcher runs both from one installation. Each place with receivers is a station, with its own position, range and figures, however many receivers stand there, and the ships they hear together form one picture.

Note

The example in this series is a station at Harwich, where the Stour and the Orwell meet the North Sea, and for this part a second one at Orford, about thirteen nautical miles up the Suffolk coast. The ships are a scripted replay in a test installation. Their names and numbers are made up, the behaviour of AIS-catcher is not.

Stations and inputs

Two words do the work. A station is a place where receivers stand. An input is what delivers a receiver's messages: a dongle on this machine, or another receiver sending NMEA over the network. They are two lists, in the dashboard and in the configuration alike. Each input names the station it stands at, and a station can have many: two dongles on one mast are two inputs at one station. From then on every message carries the number of its station.

INPUTS Dongle on the roof rtlsdr · 00000001 Second dongle rtlsdr · 00000002 Pi at Orford, over UDP udpserver · port 10110 station 3 station 3 station 5 STATIONS id 3 Harwich 51.94, 1.28 id 5 Orford 52.09, 1.53 AIS-catcher one tracker every message carries its station all ships filter id 3 per station The main map both stations, every ship A filtered server what station 3 heard API, MQTT, health figures for each station
Two lists: the inputs, and the stations they stand at. Both dongles at Harwich are station 3. The one tracker keeps the station with every message, so every view can show all stations or just one.

In the dashboard:

  1. Open Settings, then Stations, and press Add station. Give it a name and a position: fixed, from a GPS, or on a vessel for a receiver that sails.
  2. Open Inputs, pick an input and choose its station under Station.
  3. Press Save changes.

The Harwich station in the dashboard: number 3, its name, a fixed position with latitude and longitude, and a map of where it stands. It is used by the input Harwich UDP.

A station has a number, a name and a position. The page names the inputs that stand on it.

The input Harwich UDP in the dashboard: a UDP input on port 8451, standing at station 3, Harwich.

An input picks its station from the list.

A second antenna rarely sits on the same machine. The usual set-up is a small receiver at the far site, a Raspberry Pi with a dongle, that forwards what it hears over UDP to the central installation:

On the Pi at Orford

AIS-catcher -d 00000001 -u 192.168.1.10 10110

The central machine takes that stream in as an input of its own, standing at the Orford station. In its configuration file:

config.json, on the central machine

"stations": [
    { "id": 3, "name": "Harwich", "lat": 51.94, "lon": 1.28 },
    { "id": 5, "name": "Orford",  "lat": 52.09, "lon": 1.53 }
],
"receiver": [
    { "input": "rtlsdr", "serial": "00000001", "station": 3 },
    { "input": "rtlsdr", "serial": "00000002", "station": 3 },
    { "input": "udpserver", "udpserver": { "port": 10110 }, "station": 5 }
]

Stations are optional. Out of the box every input stands at the default station, numbered 0: one dongle, or several on the same mast, is one station, and nothing needs setting up. Stations matter once receivers stand in different places.

What you see in the browser

The map shows both stations with their range rings, and every ship either of them hears. Distance and bearing are measured from the station that heard the ship, so each antenna's range stands on its own.

The web viewer with two stations, Harwich and Orford, each with its range rings, and ten ships between them.

Harwich in the south, Orford in the north: ten ships, heard by one station or both.

A ship in reach of both lists both, on the AIS tab of its card.

The AIS tab of the ship card of ORWELL STAR, listing the stations Harwich and Orford.

ORWELL STAR, heard at Harwich and at Orford.

Click a station and its card opens: the ships it hears, its message rate, whether it is receiving, how far it reaches, and an Activity strip of the last 24 hours. While the card is open the map looks through that station alone, and the header says so. Close the card and the full picture is back.

The station card of Harwich on the Activity tab, with a 24-hour strip, while the map shows only what Harwich hears.

The Harwich card. The map now shows what Harwich hears, and the header names the station.

To stay with one station longer, pick it under Filter in the viewer's settings. The statistics can be read per station too: messages, ranges and plots for one station, or Plots, Compare to set two against each other.

One station on a server of its own

Sometimes one station belongs to someone else: a sailing club's antenna on the harbour wall, say, and the club would like a map of its own. That is not a viewer per station but a filter. Add a server under Services and switch on its filter for that station: the server keeps the ships the station hears, and its markers, pages and figures are that station's.

config.json

"services": [
    { "port": 8120, "bind": "0.0.0.0", "filter": "on", "id": 3 }
]

A second server, filtered on station Harwich: one station with its range rings and six ships.

The server filtered on Harwich: six ships, against the ten on the full map.

Private by default

Where an antenna stands is often someone's house. A station's position stays on the machine unless you switch on Share position on its page. Without it, no map, API, MQTT topic or webhook says where the station is, and the community map keeps it private too. Ranges and bearings are still measured from it, on the machine itself.

Stations in the other tools

The station travels with every message, so the tools in the next parts know it too:

  • The API lists the stations under /api/v1/stations with the vessels each heard in the last hour, /api/v1/stations/{id}/statistics gives one station's figures, and /api/v1/vessels?stations=5 gives the ships one station heard.
  • Home Assistant gets an online sensor and a vessel count for each station.
  • Health warns when a station has heard nothing for 15 minutes, so a dead antenna at the far site does not go unnoticed.

Next: geofencing, the areas on the map that turn positions into arrivals and departures.

Where to go next

New to AIS-catcher, or setting it up step by step? Start with the Quick Start. Every option of this tutorial is in the documentation.