Skip to content

Instantly share code, notes, and snippets.

@initialed85
Last active February 2, 2020 17:42
Show Gist options
  • Save initialed85/b649b023aa468507dff2735edba49ec5 to your computer and use it in GitHub Desktop.
Save initialed85/b649b023aa468507dff2735edba49ec5 to your computer and use it in GitHub Desktop.
V2X safety/awareness message content (SAE BSM and ETSI CAM)
Here's one of SAE's BSMs in XER format (size units are centimetres apparently):
<BasicSafetyMessage>
<coreData>
<msgCnt>33</msgCnt>
<id>FEF0EFD0</id>
<secMark>51333</secMark>
<lat>-419231528</lat>
<long>158945769</long>
<elev>27</elev>
<accuracy>
<semiMajor>54</semiMajor>
<semiMinor>54</semiMinor>
<orientation>0</orientation>
</accuracy>
<transmission>
<unavailable/>
</transmission>
<speed>4</speed>
<heading>19156</heading>
<angle>127</angle>
<accelSet>
<long>58</long>
<lat>-1</lat>
<vert>-127</vert>
<yaw>0</yaw>
</accelSet>
<brakes>
<wheelBrakes>00000</wheelBrakes>
<traction>
<unavailable/>
</traction>
<abs>
<unavailable/>
</abs>
<scs>
<unavailable/>
</scs>
<brakeBoost>
<unavailable/>
</brakeBoost>
<auxBrakes>
<unavailable/>
</auxBrakes>
</brakes>
<size>
<width>184</width>
<length>497</length>
</size>
</coreData>
<partII>
<SEQUENCE>
<partII-Id>0</partII-Id>
<partII-Value>
<VehicleSafetyExtensions>
<pathHistory>
<crumbData>
<PathHistoryPoint>
<latOffset>53</latOffset>
<lonOffset>99</lonOffset>
<elevationOffset>7</elevationOffset>
<timeOffset>213</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>3</latOffset>
<lonOffset>119</lonOffset>
<elevationOffset>0</elevationOffset>
<timeOffset>7033</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-146</latOffset>
<lonOffset>-468</lonOffset>
<elevationOffset>-6</elevationOffset>
<timeOffset>19533</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-214</latOffset>
<lonOffset>-489</lonOffset>
<elevationOffset>0</elevationOffset>
<timeOffset>20353</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-675</latOffset>
<lonOffset>-575</lonOffset>
<elevationOffset>0</elevationOffset>
<timeOffset>22553</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-480</latOffset>
<lonOffset>-560</lonOffset>
<elevationOffset>-7</elevationOffset>
<timeOffset>23093</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-406</latOffset>
<lonOffset>-803</lonOffset>
<elevationOffset>-16</elevationOffset>
<timeOffset>25433</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-94</latOffset>
<lonOffset>1641</lonOffset>
<elevationOffset>-304</elevationOffset>
<timeOffset>37273</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-381</latOffset>
<lonOffset>1865</lonOffset>
<elevationOffset>-316</elevationOffset>
<timeOffset>41472</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-421</latOffset>
<lonOffset>1856</lonOffset>
<elevationOffset>-317</elevationOffset>
<timeOffset>41792</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-412</latOffset>
<lonOffset>1818</lonOffset>
<elevationOffset>-326</elevationOffset>
<timeOffset>42592</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-10</latOffset>
<lonOffset>3706</lonOffset>
<elevationOffset>-626</elevationOffset>
<timeOffset>43632</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-513</latOffset>
<lonOffset>-468</lonOffset>
<elevationOffset>-182</elevationOffset>
<timeOffset>45552</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-290</latOffset>
<lonOffset>-401</lonOffset>
<elevationOffset>-119</elevationOffset>
<timeOffset>46032</timeOffset>
</PathHistoryPoint>
<PathHistoryPoint>
<latOffset>-336</latOffset>
<lonOffset>-429</lonOffset>
<elevationOffset>-142</elevationOffset>
<timeOffset>46572</timeOffset>
</PathHistoryPoint>
</crumbData>
</pathHistory>
<pathPrediction>
<radiusOfCurve>32767</radiusOfCurve>
<confidence>200</confidence>
</pathPrediction>
</VehicleSafetyExtensions>
</partII-Value>
</SEQUENCE>
</partII>
</BasicSafetyMessage>
Here's one of ETSI's CAMs in XER format (size units seem to be decimetres):
<CAM>
<header>
<protocolVersion>1</protocolVersion>
<messageID>2</messageID>
<stationID>1210187986</stationID>
</header>
<cam>
<generationDeltaTime>1720</generationDeltaTime>
<camParameters>
<basicContainer>
<stationType>5</stationType>
<referencePosition>
<latitude>-19231621</latitude>
<longitude>158946244</longitude>
<positionConfidenceEllipse>
<semiMajorConfidence>663</semiMajorConfidence>
<semiMinorConfidence>663</semiMinorConfidence>
<semiMajorOrientation>0</semiMajorOrientation>
</positionConfidenceEllipse>
<altitude>
<altitudeValue>580</altitudeValue>
<altitudeConfidence>
<alt-010-00/>
</altitudeConfidence>
</altitude>
</referencePosition>
</basicContainer>
<highFrequencyContainer>
<basicVehicleContainerHighFrequency>
<heading>
<headingValue>2575</headingValue>
<headingConfidence>126</headingConfidence>
</heading>
<speed>
<speedValue>10</speedValue>
<speedConfidence>4</speedConfidence>
</speed>
<driveDirection>
<unavailable/>
</driveDirection>
<vehicleLength>
<vehicleLengthValue>49</vehicleLengthValue>
<vehicleLengthConfidenceIndication>
<trailerPresenceIsUnknown/>
</vehicleLengthConfidenceIndication>
</vehicleLength>
<vehicleWidth>18</vehicleWidth>
<longitudinalAcceleration>
<longitudinalAccelerationValue>-14</longitudinalAccelerationValue>
<longitudinalAccelerationConfidence>102</longitudinalAccelerationConfidence>
</longitudinalAcceleration>
<curvature>
<curvatureValue>0</curvatureValue>
<curvatureConfidence>
<onePerMeter-0-002/>
</curvatureConfidence>
</curvature>
<curvatureCalculationMode>
<yawRateUsed/>
</curvatureCalculationMode>
<yawRate>
<yawRateValue>0</yawRateValue>
<yawRateConfidence>
<unavailable/>
</yawRateConfidence>
</yawRate>
<accelerationControl>0000000</accelerationControl>
<lateralAcceleration>
<lateralAccelerationValue>0</lateralAccelerationValue>
<lateralAccelerationConfidence>102</lateralAccelerationConfidence>
</lateralAcceleration>
</basicVehicleContainerHighFrequency>
</highFrequencyContainer>
</camParameters>
</cam>
</CAM>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment