About Oban AIS watch, Oban SAR watch, and Oban ADS-B

Oban AIS watchOban SAR watch  and Oban ADS-B are a hobby based project that tweets the movement of ships and aircraft around the Oban area.

DISCLAIMER: this is an experimental service for my personal use - no warranties on correctness of information from either twitter feed. Twitter feeds often report incorrect information. The receiver is taken offline regularly so may not report positions for some time or may report stale positions and vessel information.

How it works:

AIS (Ship and SAR aircraft positions):

Raspberry Pi 2 single-board-computer receives AIS transmissions on VHF radio using an RTL-SDR USB receiver and a home-made Moxon rectangle antenna installed in the loft of our home in Benderloch, 8 miles north of Oban. 

Gnuradio and gr-ais software running on the Pi creates raw AIS messages on the local network and also uploads them to MarineTraffic and AISHub on the internet via UDP.

Python code on the Pi, based on work by Brian Lane, receives the AIS messages and decodes them. Vessel details taken from AIS (name, position, SOG/COG, type etc), along with manually entered port details are then stored in a local MySQL database. 

The python script and database keep track of which vessels are in range, and their distances from defined home ports. A tweet is sent when a vessel enters or leaves the reception range of the receiver, and when the distance between a vessel and its assigned port exceeds a threshold (currently 300m). 

Tweets are sent from the python script via a TwitterAPI to one of two twitter channels. General vessel movements are sent via @ObanAIS. If a vessel's MMSI number begins 111 (SAR aircraft) or the MMSI is manually tagged in the database as being an RNLI SAR vessel, then the tweet is also sent to @ObanSARWatch 

Some details in setting up the Raspberry Pi as an AIS receiver are detailed here:
http://electron-tinker.blogspot.co.uk/2016/02/rasperry-pi-rtl-srd-ais-tracker-for.html

ADS-B (aircraft movements)

A second RTL-SDR dongle on the Raspberry Pi receives ADS-B broadcasts using dump1090-mutability software. Software based on work by Kevin Brandon (Above Tustin) monitors aircraft positions and sends a tweet (including track) when interesting aircraft are in range.
Messages from aircraft that do not broadcast a position (i.e. those equipped solely with a Mode-S transmitter) are sent to various ADS-B aggregation websites, which in return provide estimated positions back via MLAT. Not all aircraft positions can be determined in this manner, so some tweets may just report when an aircraft is in range of the receiver with an RSSI over a given threshold.



Types of Tweet (AIS):

[Vessel Name] [MMSI] Leaving the area [timestamp]
Vessels not heard for 10 minutes that were travelling at over 2 knots are deemed to have left the area and a tweet is sent. The vessel record in SQL database is updated as being out of range. As geographical coverage is sporadic due to mountainous terrain, vessels regularly drop in and out of reception range, therefore only those vessels with a significant speed when last heard are deemed to have left the area, rather than those stationary vessels that have simply turned off their transmitters or are on the edge of reception range.

[Vessel Name] [MMSI] NOW IN RANGE [timestamp]
If an AIS message is received from a MMSI number that is currently marked as out-of-range in the database, or has never been heard before, then a tweet is sent and the vessel marked as in-range in the database.

[Vessel Name] [MMSI] arriving in port of [port name] [timestamp]
[Vessel Name] [MMSI] leaving of [port name] [timestamp]
A table of nearby ports of call is maintained in the database. The home port(s) for any chosen vessel are also stored in a table in the database. When a vessel is in range and the distance to a port is under 300m, the vessel is deemed to have arrived in port, a tweet is sent and the vessel is marked in the database as being at that port.  If the vessel's distance to port exceeds 300m, then the tweet is sent indicating it is leaving port and the database updated accordingly.

[Vessel Name] [MMSI] seen in the vicinity [timestamp]
Vessel names are taken from their AIS transmissions, but not all AIS messages contain the vessel name. If a position report is received yet no vessel name is stored in the database, then a tweet is still sent, but with a blank name.
If a subsequent AIS static voyage data report is received (which contains the vessel name, but not the position), then a tweet is sent as above to identify the vessel against its MMSI number and the name stored in the database for later use.

AIS Coverage:

The antenna is oriented towards Oban Bay. Coverage is very much determined by hills and mountains, but we receive the majority of traffic in and around Oban Bay, Loch Creran, Loch Linne and the southern end of the Sound of Mull up to Lochaline. We also receive a tiny patch outside Mallaig harbour, some 35 nautical miles to the North across the Morven peninsula. There are a few not-spots, such as in the shadow of Beinn Lora

Not all vessels in Oban bay are received unfortunately - small fishing vessels appear to get lost when entering via the North Channel, but the CalMac ferries between Oban and Craignure are well received, as well as Glensanda Quarry traffic and South Shian fish processing plant traffic.

SAR helicopter range is much greater when airborne.
Below is a screenshot of a typical day's coverage, including two SAR helicopter movements and a long-range message received from near Mallaig. Known vessels are green triangles. Unknown vessels in Yellow. 




No comments:

Post a Comment