Orion's station page on AISHub

Putting Orion on the map

We’re preparing for a Pacific crossing, and one of the things we want before we go is more AIS on the chart plotter than the AIS700 can hear on its own. VHF range is twenty miles or so. The ocean is bigger than that.

The idea has two halves, and they depend on each other. If other boats report their positions to the internet, and Orion reports hers, then any boat, or any emergency response team, can find us. That’s the first half, and it’s this post. The second half is the return trip: if we can pull those reports back down and put boats hundreds or thousands of miles away on our own plotter, we know who is out there, and if we ever need help we may be able to contact them over the phone. That’s the next post, and where the real work was.

Neither half does much on its own. Together they mean we can be found, and we can see who else is out there.

The deal

AISHub is a volunteer AIS data exchange. Feed them what your receiver hears and they give you everything their receivers hear, worldwide, through their API. That’s the whole arrangement, and it’s why the sending half comes first. We send the same feed to MarineTraffic as well. They give nothing back, but a second destination costs nothing and helps anyone who uses them.

AISHub accepted us on 23 September as a roaming station. Here’s the page a few days later, off the west coast of Puerto Rico.

Orion's station page on AISHub
Our station page on AISHub. The receiver icon on the coast is us; the ships in coverage are what the AIS700 was hearing at the time.

The path off the boat

Our Raymarine AIS700 is on the SeaTalkng / NMEA 2000 backbone. A Yacht Devices YDWG-02 repeats the bus onto the boat Wi-Fi. A Victron Cerbo GX runs Signal K, which reads the gateway. AISHub wants NMEA 0183 AIS sentences over UDP, one position per vessel per minute is plenty, and it won’t display a station’s own boat unless she’s sent as !AIVDM like everyone else rather than !AIVDO.

!AIVDM and !AIVDO

The NMEA 0183 AIS sentences carry the same payload, the raw AIS message bits, under two different headers. !AIVDM (VHF Data-link Message) is a message your receiver heard from another vessel. !AIVDO (VHF Data-link Own-vessel) is your own transponder telling the boat what it just broadcast about itself. The difference is only the label, so a plotter can draw everyone else from VDM sentences and your own boat from VDO sentences without mixing them up.

AISHub and MarineTraffic are built for shore receivers, which have no own vessel, so they ignore !AIVDO. Send them your own transponder’s VDO sentences unchanged and your boat never appears. The forwarder relabels own-vessel sentences as !AIVDM before sending, and turns that off when feeding a plotter, which does want to know which target is you.

We wrote a Signal K plugin for exactly that: ais-n2k-to-0183-forwarder, free, in the Signal K app store. It reads the NMEA 2000 bus, keeps only messages from the AIS device you tick, converts them to NMEA 0183, relabels own-vessel as !AIVDM, rate-limits per vessel, and sends to any number of host/port/protocol destinations.

ais-n2k-to-0183-forwarder settings in Signal K
The plugin in Signal K. 1: the AIS700 is the only source. 2 and 3: MarineTraffic and AISHub, UDP, 60 seconds per vessel. 4: own vessel sent as !AIVDM.

Why not an existing forwarder

We started with a general-purpose one. The problem shows up in the second half of the project: once Signal K also holds vessels that came from AISHub, a forwarder that sends “whatever Signal K has” can leak AISHub’s own data back to AISHub, which their terms forbid. Ours reads one named device straight off the bus, so nothing that arrived over the internet can go back out.

Result

First full day, work boats out: the AIS700 heard eleven vessels and AISHub showed all of them within minutes. It has run without errors since.

Next: the other half of the deal, and the YDWG-02 bug that took some finding.