初读标准时,较为生涩难懂,在这里结合标准,解读下自己目前对V2X消息的理解。尊重版权,禁止转载。
map消息结构图:
图片来自 T/CSAE 53-2017《合作式智能运输系统 车用通信系统应用层及应用数据交互标准》
下载链接:https://download.csdn.net/download/fantasyYXQ/88799958
1、TimeStamp和msgCount:时间戳和消息编号
2、Node:地图节点。节点是地图的最基本组成部分,可以是交叉路口,也可以是一个路段的端点。在地图上,相邻且有序的两个节点确定一条有向路段。节点属性包括名称、ID、位置以及与节点相连的上游路段集合。节点数据帧中包含的路段列表,均以该节点作为下游端点。而以该节点为上游端点的路段,则归属于该路段下游节点的数据帧。
3、name:节点名称
4、id:节点id,由一个全局唯一的地区 ID 和一个地区内部唯一的节点 ID 组成
5、refPos(3D):节点的位置信息,单位是10的负七次方度,应将该点尽量选取在接近路口中心的位置
6、Link:定义路段。从一个节点到相邻另一个节点的道路称为一个有向路段。其属性包含名称、上游节点ID、限速集合、车道宽度,以及该路段包含的车道集合与交通标志标牌集合(英文单次link习惯理解是连接,在这里理解为路段)
7、name:路段的名称
8、upstreamNodeId:理解为上游节点节点ID,也是包含一个区域ID和一个节点ID
9、speedLimits:例举出所有的限速信息
10、laneWidth:两个节点之间连接的路段的宽度,单位厘米。18-19这条路的宽度就是消息里面的linkwidth,值为660,即6.6米
11、ponis:Define road points along the center of this link,路段中心点列
12、lanes:这条连接包含的所有车道。一条车道包含车道ID、共享属性、车道出口的允许转向行为、车道与下游路段车道的连接关系列表以及车道中间点列表
13、laneID:车道ID。每一条有向路段上的每个车道,都拥有一个单独的ID,数值0表示无效ID。比如下面的map消息中,名为18-19这条路段中,有两条车道,它们的ID是1和2
14、LaneAttributes:定义车道属性。包括车道共享情况以及车道本身所属的类别特性。包含shareWith和laneType两个属性
15、shareWith:共享属性。不懂是什么意思,知道了再来补充
16、laneType:车道属性集合。有LaneAttributes-Vehicle、LaneAttributes-Crosswalk、LaneAttributes-Bike等。例如LaneAttributes-Vehicle,值是比特流(BIT STRING),共8位
17、maneuvers:定义一个(机动车)车道的允许转向行为,值为比特流(BIT STRING),一共是12个比特位。第一位上表征的是直行,第二位上表征的是左转,第三位上表征的是右转. . .例如下面消息里面的"110000000000"表示直行和左转被允许? (maneuvers:动机?转向?)
18、points:定义一个有向路段上的中间位置点列表,用来表达路段上截面或片段的特殊属性。列表中所有位置点需按上游至下游顺序排列
19、ConnectsTo:定义路段中每条车道,在下游路口处与下游路段中车道的转向连接关系列表
20、Connection:定义当前车道与下游路段中车道的连接关系。包括下游路段出口节点ID、连接的下游路段车道基本信息以及对应的信号灯相位号。这里的Connection还是比较重要,通过Connection可以拿到上、中、下游3个路口的id,通过这3个id可以计算出一个角度,以此来确定左转的phaseId,直行的phaseId,右转的phaseId。其实可以通过movement来确定左转,直行,右转的phaseId的,但在下面抓到的MAP中,并没有movement,所以这里通过connection来确定phaseId
21、speedLimits:限速信息
22、Movement:描述道路与下游路段的连接关系,以及该连接对应的本地路口处信号灯相位ID。此处的相位ID事实上也是MAP消息与SPAT消息的唯一关联。车辆在确定了转向行为后,能够通过该相位ID数据,查看到SPAT中对应的相位实时状态,从而获得行车过程中的信号灯数据辅助。
23、remoteIntersection和phaseId:见SPAT消息解释
24、ConnectingLane:用于定位上游车道转向连接的下游车道。包括下游车道ID以及该转向的允许行驶行为,下游车道ID的作用范围是该车道所在的路段。
下面是现场抓取一条map消息
<MessageFrame>
<mapFrame>
<msgCnt>1</msgCnt>
<nodes>
<Node>
<name>******</name>
<id>
<region>10</region>
<id>19</id>
</id>
<refPos>
<lat>******</lat>
<long>******</long>
<elevation>0</elevation>
</refPos>
<inLinks>
<Link>
<name>18-19</name>
<upstreamNodeId>
<region>10</region>
<id>18</id>
</upstreamNodeId>
<speedLimits>
<RegulatorySpeedLimit>
<type><vehicleMaxSpeed/></type>
<speed>833</speed>
</RegulatorySpeedLimit>
</speedLimits>
<linkWidth>660</linkWidth>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
<lanes>
<Lane>
<laneID>1</laneID>
<laneWidth>330</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
110000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>12</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
010000000000
</maneuver>
</connectingLane>
<phaseId>7</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>20</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>6</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
<Lane>
<laneID>2</laneID>
<laneWidth>330</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
001000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>29</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
001000000000
</maneuver>
</connectingLane>
<phaseId>8</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
</lanes>
</Link>
<Link>
<name>12-19</name>
<upstreamNodeId>
<region>10</region>
<id>12</id>
</upstreamNodeId>
<speedLimits>
<RegulatorySpeedLimit>
<type><vehicleMaxSpeed/></type>
<speed>833</speed>
</RegulatorySpeedLimit>
</speedLimits>
<linkWidth>800</linkWidth>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
<lanes>
<Lane>
<laneID>1</laneID>
<laneWidth>400</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
110000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>20</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
010000000000
</maneuver>
</connectingLane>
<phaseId>17</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>29</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>16</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
<Lane>
<laneID>2</laneID>
<laneWidth>400</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
101000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>29</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>16</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>18</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
001000000000
</maneuver>
</connectingLane>
<phaseId>18</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
</lanes>
</Link>
<Link>
<name>20-19</name>
<upstreamNodeId>
<region>10</region>
<id>20</id>
</upstreamNodeId>
<speedLimits>
<RegulatorySpeedLimit>
<type><vehicleMaxSpeed/></type>
<speed>833</speed>
</RegulatorySpeedLimit>
</speedLimits>
<linkWidth>660</linkWidth>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
<lanes>
<Lane>
<laneID>1</laneID>
<laneWidth>330</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
110000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>29</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
010000000000
</maneuver>
</connectingLane>
<phaseId>27</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>18</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>26</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
<Lane>
<laneID>2</laneID>
<laneWidth>330</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
001000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>12</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
001000000000
</maneuver>
</connectingLane>
<phaseId>28</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
</lanes>
</Link>
<Link>
<name>129-19</name>
<upstreamNodeId>
<region>10</region>
<id>29</id>
</upstreamNodeId>
<speedLimits>
<RegulatorySpeedLimit>
<type><vehicleMaxSpeed/></type>
<speed>833</speed>
</RegulatorySpeedLimit>
</speedLimits>
<linkWidth>780</linkWidth>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
<lanes>
<Lane>
<laneID>1</laneID>
<laneWidth>390</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
110000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>18</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
010000000000
</maneuver>
</connectingLane>
<phaseId>37</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>12</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>36</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
<Lane>
<laneID>2</laneID>
<laneWidth>390</laneWidth>
<laneAttributes>
<shareWith>
0000000000
</shareWith>
<laneType>
<vehicle>
00000000
</vehicle>
</laneType>
</laneAttributes>
<maneuvers>
101000000000
</maneuvers>
<connectsTo>
<Connection>
<remoteIntersection>
<region>10</region>
<id>12</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
100000000000
</maneuver>
</connectingLane>
<phaseId>36</phaseId>
</Connection>
<Connection>
<remoteIntersection>
<region>10</region>
<id>20</id>
</remoteIntersection>
<connectingLane>
<lane>1</lane>
<maneuver>
001000000000
</maneuver>
</connectingLane>
<phaseId>38</phaseId>
</Connection>
</connectsTo>
<points>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
<RoadPoint>
<posOffset>
<offsetLL>
<position-LatLon>
<lon>******</lon>
<lat>******</lat>
</position-LatLon>
</offsetLL>
</posOffset>
</RoadPoint>
</points>
</Lane>
</lanes>
</Link>
</inLinks>
</Node>
</nodes>
</mapFrame>
</MessageFrame>
通过上面这条消息,可以初步画出这个路口的情况如下: