If you want to ingest our entire cleansed AIS data feed and perform the additional processing on your end, you should try the Messages API. We'd also recommend the Messages API for gauging Spire's overall AIS collection performance.
If you're interested in accessing the most recent, vetted data that Spire has on ships, you should opt for the Vessels API.
How do ships get vetted?
As you're probably aware, AIS isn't a perfect system:
MMSIs, which are supposed to be unique, sometimes get used by multiple ships.
Sometimes MMSI/IMO relationships change.
Sometimes a ship periodically broadcasts nonsensical position information, etc.
The Vessels API uses machine learning techniques to put greater trust in the ships that have a track record of consistency and accuracy, and give less weight to the data from more erratic ships.
Satellite vs. Terrestrial Feeds
Spire satellites spend most of their time over open ocean listening for AIS messages. These messages are published shortly after our satellites pass over a Spire ground station to download them. Given this, satellite-received AIS (S-AIS) messages are often published in "bursts". The primary advantage of S-AIS is global coverage.
Terrestrial AIS message (T-AIS) collection generally occurs near coastlines and takes place after a ship transmits them. Given that, terrestrially-received AIS messages are immediately made available to you. The primary advantage of T-AIS is extremely low latency.
With Spire Sense, you can receive combined T-AIS and S-AIS through one API.
For Terrestrial Feed
Due to the sheer number of T-AIS messages Spire receives, we do not publish all of these within the Spire Sense platform. T-AIS messages are downsampled within 5-minute periods based on MMSI and message type. For example, if we receive 2 position messages with a particular MMSI 3 minutes apart from terrestrial sources, only the first of the two position messages would get published. If these messages were 7 minutes apart, both would get published.
For Satellite Feed
S-AIS messages are not downsampled.
Combined Satellite & Terrestrial Feeds
Given that T-AIS is published immediately and there's often some delay between the collection and download of an S-AIS message, it will often be the case that AIS messages are published within our services out of timestamp order. (We don't store our AIS messages in a buffer and sort them before publishing them.) This is to give you access to our AIS messages as soon as they're downloaded.
Satellite AIS Message Download Priority
Spire has many satellites in a variety of orbits and a number of global ground stations to collect and download AIS data. It’s not always realistic for us to get all of the AIS messages off of a satellite on the initial pass of a ground station. In order to get the most important data down first, we prioritize the most recent message for each MMSI and get all of those down first before moving on to the older messages either during that same contact or during subsequent ones with other ground stations.
What that means in terms of how we push data to our AIS production services is that you’ll get the “freshest” data for an MMSI from each satellite quickly but then in some cases get the “backfill” a little bit later.
There are two classes of AIS transceivers onboard ships:Class AandClass B. On a high level, the ways in which they differ include:
Transmitted AIS Message Types
AIS Channel Access Methods
AIS Channel Access Priority (based on channel access method)
Class A transceivers reserve their time slots for AIS transmission viaSelf Organized Time Division Multiple Access (SOTDMA). They first perform a scan of the area to ascertain which slots have been taken by other vessels and reserve an empty slot. Any transmissions in the newly reserved slot will contain information notifying other nearby AIS devices that the transceiver intends to continue using this slot.
Class B transceivers are permitted to transmit viaCarrier Sense Time Division Multiple Access (CSTDMA). Unlike SOTDMA, slots arenotreserved. They instead simply scan for available space and transmit when a free one is determined to be available.
AIS Channel Access Priority
Transmission priority is given to Class A transceivers which use SOTDMA since they reserve time slots. The timing of Class B transmissions via CSTDMA must work around the time slots reserved by Class A transceivers. If a Class B transceiver is unable to find an empty space, their transmissions are delayed.
The following fields are currently decoded within Spire Sense:
msg_type: AIS message type
mmsi: Marine Mobile Service Identity number for the vessel
timestamp: ISO8601 formatted UTC timestamp of the AIS message
accuracy: Vessel GPS geolocation accuracy, based on meters.1: high accuracy (≤ 10 meters),0: low accuracy (> 10 meters) ordefault
course: Course over ground in degrees
latitude: Vessel latitude in degrees (North = positive, South = negative)
longitude: Vessel longitude in degrees (East = positive, West = negative)
maneuver: Indicates whether or not a vessel may be engaged in a "special" maneuver
rot: Vessel rate of turn in degrees per minute
speed: Vessel speed over ground expressed in knots
status: Vessel navigation status
ais_version: Vessel AIS version
call_sign: Vessel call sign
destination: Reported destination of the vessel
draught: Vessel draught expressed in 1/10 meters
eta: Estimated time of arrival for the vessel
imo: Vessel unique International Maritime Organization number
length: Vessel length
name: Vessel name
ship_and_cargo_type: Vessel ship and cargo type code
width: Vessel width
Since AIS messages contain several fields that must be translated into human readable descriptions, we handle this forsomefields within Spire Sense for your convenience.
Theship_and_cargo_type is a 2-digit number within a static AIS message that represents the type of ship it is and what it carries. Spire Sense APIs return a ship_type description derived from the ship_and_cargo_type number.