Skip to main content

SPATEM

Version

Look for the current version via the link in the table at the message-type introduction page

caution

As of mid november 2024, Mobilidata has changed version regarding AMQP headers (version 0.9 to 1.0). This is caused by changes in the C-Roads (TF4 spec release 2.1.0) specification.

Description

The SPAT message is used to convey the current status of one or more signalized intersections. Along with the MAPEM message the receiver of this message can determine the state of the signal phasing and when the next expected phase will occur.

caution

Data packages are encoded/decoded to ASN.1 standard, using the 'UPER' encoding rules.

Attributes

"Spat": {
...
"Intersections": [
{
"Name": "WO0486-1",
"Id": {
"Region": 4001,
"Id": 171
},
...
},
...
],
...
},

The SPATEM message contains the information about the current status of one or more signalized intersections. The intersection is identified by the Name and Id attributes.

"Spat": {
...
"Intersections": [
{
...
"Moy": 425469,
"TimeStamp": 26950,
...
},
...
],
...
},

The Moy and TimeStamp attributes are used to determine the time of the message. Moy or Minutes of Year is the number of minutes since the start of the year. TimeStamp is the time in milliseconds after the Moy.

"Spat": {
...
"Intersections": [
{
...
"States": [
{
"MovementName": "A",
"SignalGroup": 1,
"State_time_speed": [
{
"EventState": 5,
"Timing": {
"StartTime": null,
"MinEndTime": 36001,
"MaxEndTime": 6213,
"LikelyTime": 5690,
"Confidence": null,
"NextTime": null
},
"Speeds": null,
"Regional": null
},
},
...
],
...
},
...
],
...
},

The States attribute contains the information about the state of the signal group. The MovementName and SignalGroup attributes are used to identify the signal group. The EventState attribute is used to determine the state of the signal group. In Timing the time information is stored. An intersection can receive multiple States. The first state in the this list is the current state, and the other one are predictions of the next states.

EventState overview

EventStateDescriptionMore info/Example
0Unavailableeg. power outage
1No signaleg. outside of operating hours
2 (red)Stop-then-proceedstop at stop line and proceed when safe
3 (red)Stop-and-remainstop at stop line and do not proceed
4 (green)Pre-movementprepare to proceed
5 (green)Permissive-movement-allowedproceed, be aware of possible conflicting traffic at intersection
6 (green)Protected-movement-allowedproceed, no conflicting traffic expected at intersection
7 (yellow)Permissive-clearanceprepare to stop and stop if possible, be aware of possible conflicting traffic at intersection
8 (yellow)Protected-clearanceprepare to stop and stop if possible, no conflicting traffic expected at intersection
9 (yellow)Caution-conflicting-trafficproceed with caution, conflicting traffic may be present at the intersection

Example

An extended description of the SPATEM ASN.1 can be found here.

SPATEM AMQP Header example
{
"id": ",4001-591,",
"custom-mobilidata-tlcID": "0fa1024e",
"quadTree": ",120202132210230013,",
"custom-mobilidata-timestamp": "1712231008642",
"messageType": "SPATEM",
"publisherId": "BE00004",
"publicationId": "BE00004:SPATEM_02",
"baselineVersion": "2.1.0",
"custom-mobilidata-dtapEnvironment": "production",
"protocolVersion": "SPATEM:1.3.1",
"originatingCountry": "BE",
"custom-mobilidata-origin-timestamp": "1712231008625",
"custom-mobilidata-baselineVersion": "D"
}

When receiving a MAPEM message, the AMQP header will contain some extra information that is not included in the MAPEM message itself. This information can be used to filter and process the message.

  • quadTree: The quadtree of the message. This can be used to filter the message on the location based on quadkeys.
  • tlcID: The identifier of the Traffic Light Controller that sent the message.
SPATEM Message example
02040fa100aa21192e66b9801c0f5e7b068e1b2d630fa100ab180400cfbfad28c1cc04101145646508c228b1d23b05910618c5961400e004401b0040012004d8182c40810dc2c9c31f22d50c080a0038c15688c43810dc2cec317a2f1cc20028008c15688c83c10dc2c9c317a2f1cc20010006c0440604370b310cf98bcc33002a00b002e00c003200d0038c0c68812086e16628ca1179811007c031606b430d045646508c6d8b4518002000001a0063010c105159194230da2d008ec1644188b169e50080021008802300900256061b10504370b270c318b2c30204c023b031a1840a2b23284636c5a291d82c8831f22d50400e803c0163055a1310b04350b36465088800c003b055a1320c04350b314650888012004301080c10dc2d0032ba2f30cc813802c814002c814802c816802c807802c0150056c0c6840e086e16588ca1178e1100b802f606b410a045646508c1d8b18080160050