Why Westerschelde?
- The Westerschelde is a busy shipping lane with continuous activity of a variety of vessels.
- There are several land-based AIS receivers, providing good coverage.
- I am familiar with the waterway, harbours and some of the ships.
- Geographic restriction limits bandwidth consumption compared to the global map.
[TL;DR]: The regional map is #1: Westerschelde AIS. The worldwide map is #2: Global AIS. More information below. Basic introduction to AIS here.
Map Implementations:
#1: Westerschelde AIS
USAGE: (1) Mouse 'click' or touch 'tap' on icons to display vessel info. (2) Select / unselect layers from menu in upper right corner. (3) Use slider for weighting map versus satellite transparency. (4) Ship data will auto-refresh every minute.
IMPLEMENTATION: A python backend parses a downsampled regional AIS datastream to a data object in memory, which is supplied to the Westerschelde_AIS JavaScript frontend as a JSON file via sftp upload, at a specified time interval (once every minute). Ships on the map are refreshed via AJAX, also once a minute. Map visualization employs the Leaflet JavaScript library. Map tiles are sourced from OpenStreetMap, Bing Aerial, and OpenSeaMap.
#3: Global AIS
USAGE: See 'instructions' on map. Best viewed on iPad, notebook or PC. The map will look a bit cluttered on a mobile phone screen.
IMPLEMENTATION: A separate python backend parses a global AIS datastream from numerous coastal stations, which encompasses about ∼40,000 ships. Coverage varies significantly between geographic regions. The backend parses ∼400 AIS-messages per second and updates the JSON to the webspace once a minute. The Global_AIS frontend is designed for manual refresh via button when zoomed out, with optional autorefresh, when zoomed in. Do not try to zoom to a worldwide view. This will propably overwhelm your browser, although it is possible (screenshot). The map initially centers on the port of Hamburg, Germany.
BACKGROUND: Unlike the VesselFinder™ or MarineTraffic™ websites, my frontend does not display pre-rendered map tiles of a shipping overlay. Instead, the frontend renders each ship onto the map canvas individually. With more than 40,000 icons, browsers will freeze on most hardware when chosing a global zoom level. Zoomed in, the frontend renders only those ships, that will be visible in the current map window.
CAVEAT: The global map frontend downloads ~10-13 MB of ship data (∼40,000 vessels), whenever reloading or refreshing (!). Please mind your data allowance when using mobile connectivity without a flat rate.
Green Computing
The backends run on a headless Raspberry Pi 4, that consumes less than 5 Watts of power. Server health, as well as ship database timestamps are displayed alternately on a low power 20x4 LCD display for monitoring.
Disclaimer
This is a purely hobbyist project. I may occasionally shut down the backends. I process the AIS datastream strictly as is. No assurances. No warranty. No liability. In any case, these maps may not be used for navigation!
AIS Data Source
I receive the AIS data from a non-commercial source. The API is subject to occasional downtimes, which are outside my sphere of influence. This seems fair enough, as the service is provided for free, without any service level agreement. Please check the refresh timestamps on the maps. A popup window will appear, in case of ship data being older than five minutes.
Why conceive a homemade AIS viewer?
As ever so often, the project spiraled out of hand, starting off from a sailing skipper's interest in the technical principles and data structures of AIS, including the peculiar 6-bit encoding.
Once a working solution, depending on proprietary google cloud infrastructure was finished, the idea of implementing this project purely with open-source tools was a logical next step.
All very basic.
All just for fun.
Background: What is AIS?
Principles:
The automatic identification system (AIS) is an information and tracking system that uses VHF transceivers on ships to disseminate information to surrounding vessels, and conversely, to receive information from them.
AIS Data:
Ships broadcast static data (e.g., their unique Maritmime Mobile Service Identity, vessel name, and voyage-related data) as well as dynamic data (e.g., position, course, and speed).
Message density:
Depending on vessel category, navigational status, and speed, any given ship may emit AIS messages at intervals from 2 seconds (commercial vessel running fast / changing course) to 3 minutes (anchored / moored).
Collision Avoidance:
AIS complements radar for situational awareness. It should not be relied upon for collision avoidance! Individual vessel information could be outdated, faulty, or missing completely (in case of ships 'going dark').
Vessel tracking:
A number of companies supply global AIS data to subscription customers, who may be fleet owners, logistic providers, freight proprietors, financial services or insurance companies. Often, a limited functionality is made available to the public via dedicated websites. The maps in this open source project allow for traffic viewing, but not for vessel search or tracking.