The difference between the 'created_at' and 'timestamp' fields in the Messages API

We differentiate these two fields, how they may impact your AIS messages processing, and how they define latency

'Created_At' vs 'Timestamp'

Note: By default the Messages API only returns a timestamp value. You must issue a fields=decoded  parameter within your API call in order to see created_at:

https://ais.spire.com/messages?fields=decoded&limit=10

One might expect created_at and timestamp to be the same, however, this often not the case, as seen in a response from the Messages API below:

  "data": [
    {
      "msg_type": 1,
      "msg_id": "1490374942_413769954",
      "course": 0,
      "collection_type": "terrestrial",
      "nmea": "!AIVDM,1,1,0,A,16:VPpPk00`U@i<BD3S@0?vd40=6,0*72",
      "rot": 120,
      "speed": 0,
      "latitude": 32.0049283333,
      "type": 1,
      "accuracy": 1,
      "status": 0,
      "maneuver": 0,
      "timestamp": "2017-03-24T17:02:22+00:00",
      "mmsi": 413769954,
      "flag": "China",
      "created_at": "2017-03-24T17:03:10.101117",
      "msg_description": "position",
      "longitude": 119.9881166667,
      "flag_short_code": "CN",
      "position": {
        "type": "Point",
        "coordinates": [
          119.9881166667,
          32.0049283333
        ]
      },
      "heading": 511
    }


The timestamp  value is tagged to an AIS message transmitted from a ship. (use vessel not ship).

The timestamp is the reception time of the AIS message by the receiving system, be it a terrestrial AIS receiver, a dynamic AIS receiver or a satellite AIS receiver. This is expected to be almost identical to the transmission time of the message and will vary from transmission time only if the system clocks of receiving systems are drifting from actual time synchronization. 

  • For messages collected by a Spire satellite, timestamp is based on the satellite time reference. (We check satellite time to a ground reference multiple times per day and synchronize whenever necessary.)
  • For messages collected by a terrestrial source, timestamp is effectively when the terrestrial source received the message. 

created_at

The timestamp is the reception time of the AIS message by the receiving system whereas 'created_at' is the Time that the message was processed by the ingestion script at Spire. Hence, 'created_at' will always be after 'timestamp' as you can see in the example provided above

Timestamp Accuracy and Filtering

Unfortunately, timestamps reported with AIS messages are not always guaranteed to be accurate. Spire Sense cleans up a significant portion of these "dirty" messages by filtering out any AIS messages with timestamps older than 30 days.

Latency

Latency is the amount of time it takes for a transmitted AIS message to get ingested into Spire Sense. In other words, latency is the difference in time between created_at and timestamp.

The average latency for AIS messages collected from a terrestrial source is significantly lower than the average latency for AIS messages collected from a satellite. There are fewer opportunities for a satellite to download AIS messages while over open ocean. In comparison, once a terrestrial source collects an AIS message, it's ingested immediately.