diff --git a/data/I_80_test.json b/data/I_80_test.json index c79f9e67..ccb56c32 100644 --- a/data/I_80_test.json +++ b/data/I_80_test.json @@ -8,3 +8,4 @@ {"metadata": {"logFileName": "bsm.uper", "odeReceivedAt": "2017-09-26T20:00:08.48Z[UTC]", "payloadType": "us.dot.its.jpo.ode.model.OdeBsmPayload", "recordGeneratedBy": "OBU", "recordType": "bsmRxRecord", "recrodGeneratedAt": "2016-08-10T16:35:45.138Z[UTC]", "sanitized": false, "schemaVersion": 3, "serialId": {"bundleId": 12, "bundleSize": 1, "recordId": 5, "serialNumber": 0, "streamId": "f9c7635a-7763-4e21-bece-cb1104f143b9"}, "validSignature": true}, "payload": {"data": {"coreData": {"accelSet": {"accelYaw": 0.0}, "accuracy": {}, "brakes": {"abs": "unavailable", "auxBrakes": "unavailable", "brakeBoost": "unavailable", "scs": "unavailable", "traction": "unavailable", "wheelBrakes": {"leftFront": false, "leftRear": false, "rightFront": false, "rightRear": true, "unavailable": false}}, "heading": 270.425, "id": "BEA10000", "msgCnt": 85, "position": {"elevation": 204.1, "latitude": 42.24576, "longitude": -83.62337}, "secMark": 600, "size": {"length": 1000, "width": 30}, "speed": 6.86}, "partII": [{"id": "VEHICLESAFETYEXT", "value": {"pathHistory": {"crumbData": [{"elevationOffset": 9.5, "latOffset": 3.5e-06, "lonOffset": 0.0131071, "timeOffset": 33.2}, {"elevationOffset": 4.6, "latOffset": 7.4e-05, "lonOffset": 0.0131071, "timeOffset": 44.6}, {"elevationOffset": 3.5, "latOffset": 9.44e-05, "lonOffset": 5.1e-06, "timeOffset": 49.3}, {"elevationOffset": 204.7, "latOffset": 0.0001826, "lonOffset": 6.37e-05, "timeOffset": 71.7}, {"elevationOffset": 204.7, "latOffset": 0.0001313, "lonOffset": 6.06e-05, "timeOffset": 80.2}, {"elevationOffset": 204.7, "latOffset": 0.0001535, "lonOffset": 7.48e-05, "timeOffset": 92.9}, {"elevationOffset": 204.7, "latOffset": 0.000165, "lonOffset": 0.0001171, "timeOffset": 126.4}, {"elevationOffset": 204.7, "latOffset": 0.0001363, "lonOffset": 0.0001, "timeOffset": 136.1}, {"elevationOffset": 204.7, "latOffset": 0.0001196, "lonOffset": 0.0001028, "timeOffset": 141.9}, {"elevationOffset": 204.7, "latOffset": 0.0001111, "lonOffset": 9.8e-05, "timeOffset": 143.0}, {"elevationOffset": 204.7, "latOffset": 0.0131071, "lonOffset": 9.5e-06, "timeOffset": 348.0}, {"elevationOffset": 12.6, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 437.8}, {"elevationOffset": 11.5, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 468.2}, {"elevationOffset": 10.0, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 474.0}, {"elevationOffset": 10.2, "latOffset": 0.0131071, "lonOffset": 7e-06, "timeOffset": 481.3}]}, "pathPrediction": {"confidence": 0.0, "radiusOfCurve": 0.0}}}]}, "dataType": "us.dot.its.jpo.ode.plugin.j2735.J2735Bsm"}, "schemaVersion": 3} {"metadata": {"logFileName": "bsm.uper", "odeReceivedAt": "2017-09-26T20:00:08.48Z[UTC]", "payloadType": "us.dot.its.jpo.ode.model.OdeBsmPayload", "recordGeneratedBy": "OBU", "recordType": "bsmRxRecord", "recrodGeneratedAt": "2016-08-10T16:35:45.138Z[UTC]", "sanitized": false, "schemaVersion": 3, "serialId": {"bundleId": 12, "bundleSize": 1, "recordId": 5, "serialNumber": 0, "streamId": "f9c7635a-7763-4e21-bece-cb1104f143b9"}, "validSignature": true}, "payload": {"data": {"coreData": {"accelSet": {"accelYaw": 0.0}, "accuracy": {}, "brakes": {"abs": "unavailable", "auxBrakes": "unavailable", "brakeBoost": "unavailable", "scs": "unavailable", "traction": "unavailable", "wheelBrakes": {"leftFront": false, "leftRear": false, "rightFront": false, "rightRear": true, "unavailable": false}}, "heading": 270.4375, "id": "BEA10000", "msgCnt": 86, "position": {"elevation": 204.2, "latitude": 42.24576, "longitude": -83.62337}, "secMark": 700, "size": {"length": 1000, "width": 30}, "speed": 6.84}, "partII": [{"id": "VEHICLESAFETYEXT", "value": {"pathHistory": {"crumbData": [{"elevationOffset": 9.5, "latOffset": 3.5e-06, "lonOffset": 0.0131071, "timeOffset": 33.2}, {"elevationOffset": 4.6, "latOffset": 7.4e-05, "lonOffset": 0.0131071, "timeOffset": 44.6}, {"elevationOffset": 3.5, "latOffset": 9.44e-05, "lonOffset": 5.1e-06, "timeOffset": 49.3}, {"elevationOffset": 204.7, "latOffset": 0.0001826, "lonOffset": 6.37e-05, "timeOffset": 71.7}, {"elevationOffset": 204.7, "latOffset": 0.0001313, "lonOffset": 6.06e-05, "timeOffset": 80.2}, {"elevationOffset": 204.7, "latOffset": 0.0001535, "lonOffset": 7.48e-05, "timeOffset": 92.9}, {"elevationOffset": 204.7, "latOffset": 0.000165, "lonOffset": 0.0001171, "timeOffset": 126.4}, {"elevationOffset": 204.7, "latOffset": 0.0001363, "lonOffset": 0.0001, "timeOffset": 136.1}, {"elevationOffset": 204.7, "latOffset": 0.0001196, "lonOffset": 0.0001028, "timeOffset": 141.9}, {"elevationOffset": 204.7, "latOffset": 0.0001111, "lonOffset": 9.8e-05, "timeOffset": 143.0}, {"elevationOffset": 204.7, "latOffset": 0.0131071, "lonOffset": 9.5e-06, "timeOffset": 348.0}, {"elevationOffset": 12.6, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 437.8}, {"elevationOffset": 11.5, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 468.2}, {"elevationOffset": 10.0, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 474.0}, {"elevationOffset": 10.2, "latOffset": 0.0131071, "lonOffset": 7e-06, "timeOffset": 481.3}]}, "pathPrediction": {"confidence": 0.0, "radiusOfCurve": 0.0}}}]}, "dataType": "us.dot.its.jpo.ode.plugin.j2735.J2735Bsm"}, "schemaVersion": 3} {"metadata": {"logFileName": "bsm.uper", "odeReceivedAt": "2017-09-26T20:00:08.48Z[UTC]", "payloadType": "us.dot.its.jpo.ode.model.OdeBsmPayload", "recordGeneratedBy": "OBU", "recordType": "bsmRxRecord", "recrodGeneratedAt": "2016-08-10T16:35:45.138Z[UTC]", "sanitized": false, "schemaVersion": 3, "serialId": {"bundleId": 12, "bundleSize": 1, "recordId": 5, "serialNumber": 0, "streamId": "f9c7635a-7763-4e21-bece-cb1104f143b9"}, "validSignature": true}, "payload": {"data": {"coreData": {"accelSet": {"accelYaw": 0.0}, "accuracy": {}, "brakes": {"abs": "unavailable", "auxBrakes": "unavailable", "brakeBoost": "unavailable", "scs": "unavailable", "traction": "unavailable", "wheelBrakes": {"leftFront": false, "leftRear": false, "rightFront": false, "rightRear": true, "unavailable": false}}, "heading": 270.1375, "id": "BEA10000", "msgCnt": 87, "position": {"elevation": 204.2, "latitude": 42.24576, "longitude": -83.62338}, "secMark": 800, "size": {"length": 1000, "width": 30}, "speed": 6.74}, "partII": [{"id": "VEHICLESAFETYEXT", "value": {"pathHistory": {"crumbData": [{"elevationOffset": 9.5, "latOffset": 3.5e-06, "lonOffset": 0.0131071, "timeOffset": 33.2}, {"elevationOffset": 4.6, "latOffset": 7.4e-05, "lonOffset": 0.0131071, "timeOffset": 44.6}, {"elevationOffset": 3.5, "latOffset": 9.44e-05, "lonOffset": 5.1e-06, "timeOffset": 49.3}, {"elevationOffset": 204.7, "latOffset": 0.0001826, "lonOffset": 6.37e-05, "timeOffset": 71.7}, {"elevationOffset": 204.7, "latOffset": 0.0001313, "lonOffset": 6.06e-05, "timeOffset": 80.2}, {"elevationOffset": 204.7, "latOffset": 0.0001535, "lonOffset": 7.48e-05, "timeOffset": 92.9}, {"elevationOffset": 204.7, "latOffset": 0.000165, "lonOffset": 0.0001171, "timeOffset": 126.4}, {"elevationOffset": 204.7, "latOffset": 0.0001363, "lonOffset": 0.0001, "timeOffset": 136.1}, {"elevationOffset": 204.7, "latOffset": 0.0001196, "lonOffset": 0.0001028, "timeOffset": 141.9}, {"elevationOffset": 204.7, "latOffset": 0.0001111, "lonOffset": 9.8e-05, "timeOffset": 143.0}, {"elevationOffset": 204.7, "latOffset": 0.0131071, "lonOffset": 9.5e-06, "timeOffset": 348.0}, {"elevationOffset": 12.6, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 437.8}, {"elevationOffset": 11.5, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 468.2}, {"elevationOffset": 10.0, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 474.0}, {"elevationOffset": 10.2, "latOffset": 0.0131071, "lonOffset": 7e-06, "timeOffset": 481.3}]}, "pathPrediction": {"confidence": 0.0, "radiusOfCurve": 0.0}}}]}, "dataType": "us.dot.its.jpo.ode.plugin.j2735.J2735Bsm"}, "schemaVersion": 3} +{"metadata": {"logFileName": "bsm.uper", "odeReceivedAt": "2017-09-26T20:00:08.48Z[UTC]", "payloadType": "us.dot.its.jpo.ode.model.OdeBsmPayload", "recordGeneratedBy": "OBU", "recordType": "bsmRxRecord", "recrodGeneratedAt": "2016-08-10T16:35:45.138Z[UTC]", "sanitized": false, "schemaVersion": 3, "serialId": {"bundleId": 12, "bundleSize": 1, "recordId": 5, "serialNumber": 0, "streamId": "f9c7635a-7763-4e21-bece-cb1104f143b9"}, "validSignature": true, "asn1": "0022e12d18466c65c1493800000e00e4616183e85a8f0100c000038081bc001480b8494c4c950cd8cde6e9651116579f22a424dd78fffff00761e4fd7eb7d07f7fff80005f11d1020214c1c0ffc7c016aff4017a0ff65403b0fd204c20ffccc04f8fe40c420ffe6404cefe60e9a10133408fcfde1438103ab4138f00e1eec1048ec160103e237410445c171104e26bc103dc4154305c2c84103b1c1c8f0a82f42103f34262d1123198103dac25fb12034ce10381c259f12038ca103574251b10e3b2210324c23ad0f23d8efffe0000209340d10000004264bf00"}, "payload": {"data": {"coreData": {"accelSet": {"accelYaw": 0.0}, "accuracy": {}, "brakes": {"abs": "unavailable", "auxBrakes": "unavailable", "brakeBoost": "unavailable", "scs": "unavailable", "traction": "unavailable", "wheelBrakes": {"leftFront": false, "leftRear": false, "rightFront": false, "rightRear": true, "unavailable": false}}, "heading": 270.1375, "id": "BEA10001", "msgCnt": 87, "position": {"elevation": 204.2, "latitude": 42.24576, "longitude": -83.62338}, "secMark": 800, "size": {"length": 1000, "width": 30}, "speed": 6.74}, "partII": [{"id": "VEHICLESAFETYEXT", "value": {"pathHistory": {"crumbData": [{"elevationOffset": 9.5, "latOffset": 3.5e-06, "lonOffset": 0.0131071, "timeOffset": 33.2}, {"elevationOffset": 4.6, "latOffset": 7.4e-05, "lonOffset": 0.0131071, "timeOffset": 44.6}, {"elevationOffset": 3.5, "latOffset": 9.44e-05, "lonOffset": 5.1e-06, "timeOffset": 49.3}, {"elevationOffset": 204.7, "latOffset": 0.0001826, "lonOffset": 6.37e-05, "timeOffset": 71.7}, {"elevationOffset": 204.7, "latOffset": 0.0001313, "lonOffset": 6.06e-05, "timeOffset": 80.2}, {"elevationOffset": 204.7, "latOffset": 0.0001535, "lonOffset": 7.48e-05, "timeOffset": 92.9}, {"elevationOffset": 204.7, "latOffset": 0.000165, "lonOffset": 0.0001171, "timeOffset": 126.4}, {"elevationOffset": 204.7, "latOffset": 0.0001363, "lonOffset": 0.0001, "timeOffset": 136.1}, {"elevationOffset": 204.7, "latOffset": 0.0001196, "lonOffset": 0.0001028, "timeOffset": 141.9}, {"elevationOffset": 204.7, "latOffset": 0.0001111, "lonOffset": 9.8e-05, "timeOffset": 143.0}, {"elevationOffset": 204.7, "latOffset": 0.0131071, "lonOffset": 9.5e-06, "timeOffset": 348.0}, {"elevationOffset": 12.6, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 437.8}, {"elevationOffset": 11.5, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 468.2}, {"elevationOffset": 10.0, "latOffset": 0.0131071, "lonOffset": 0.0131071, "timeOffset": 474.0}, {"elevationOffset": 10.2, "latOffset": 0.0131071, "lonOffset": 7e-06, "timeOffset": 481.3}]}, "pathPrediction": {"confidence": 0.0, "radiusOfCurve": 0.0}}}]}, "dataType": "us.dot.its.jpo.ode.plugin.j2735.J2735Bsm"}, "schemaVersion": 3} \ No newline at end of file diff --git a/src/bsmHandler.cpp b/src/bsmHandler.cpp index d39853ee..700ef547 100644 --- a/src/bsmHandler.cpp +++ b/src/bsmHandler.cpp @@ -184,6 +184,10 @@ bool BSMHandler::process( const std::string& message_json ) { } metadata["sanitized"] = true; + + if (metadata.HasMember("asn1")) { + metadata["asn1"].SetString("", document.GetAllocator()); + } // get the payload type if (!metadata.HasMember("payloadType")) {