News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

GM PDR Data Extraction

Started by JSenek, June 17, 2020, 08:28:28 PM

Previous topic - Next topic

Phil Harvey

Quote from: oosheixe on October 20, 2020, 07:59:39 AM
@PhilHarvey, if it is possible to extract the referenced metadata, would you demonstrate how to do so?

My last post shows how to extract the marl in hex form.  It can't currently be extracted in binary form (I hacked ExifTool to get the marl.dat file I attached to my last post).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

oosheixe

Hi Phil,

I was a bit vague/imprecise when I said "the referenced metadata".
Rather than the "marl" sensor data stream, what I am interested in using exiftool to extract is the following metadata fields within the mp4 file:
-  a Header ('mrlh')
-  a Values ('mrlv')
-  a Dictionary ('mrld')

are these able to be accessed via exiftool in its current form?
or is this something that would need to be added into exiftool to be able to print out normally (ie. not hexdump)?

thanks again

Phil Harvey

Yes, these are available with command like this:

exiftool -u -unknown_mrlh -b FILE > mrlh.dat

But most of the interesting stuff is in the marl data, which can't be extracted like this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jparrish88

Here's the dictionary mrld decoded (Thanks for the help on this) :


[['Channel Number', 'Channel Quantity', 'Channel Units', 'Units String', 'Flags', 'Interval', 'Min Reading', 'Max Reading', 'Disp Min', 'Disp Max', 'Multiplier', 'Offset', Channel Name', 'Channel Description'],
[1, 0, 0, '', 1, 50000000, 0, 3, 0.0, 3.0, 1.0, 0.0, 'System Power Mode', 'System Power Mode'],
[2, 0, 0, '', 1, 50000000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'System Backup Power Enabled', 'System Backup Power Enabled'],
[3, 0, 0, '', 1, 50000000, 0, 3, 0.0, 3.0, 1.0, 0.0, 'System Backup Power Mode', 'System Backup Power Mode'],
[4, 0, 0, '', 1, 0, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Steering 1 Switch', 'Steering 1 Switch'],
[5, 0, 0, '', 1, 0, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Steering 2 Switch', 'Steering 2 Switch'],
[6, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Transport Storage Mode', 'Transport Storage Mode'],
[7, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Infotain Op Mode', 'Infotain Op Mode'],
[8, 0, 0, '', 1, 0, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Valet Mode', 'Valet Mode'],
[9, 16, 1, '%', 7, 1000000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Boost Pressure Ind', 'Boost Pressure Ind'],
[10, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Coolant Temp', 'Coolant Temp'],
[11, 9, 5, 'kPa', 7, 120000, 0, 127, -40.0, 120.0, 1000.0, -40000.0, 'Intake Boost Pressure', 'Intake Boost Pressure'],
[12, 9, 5, 'kPa', 7, 5000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'Oil Pressure', 'Oil Pressure'],
[13, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Oil Temp', 'Oil Temp'],
[14, 8, 1, 'rpm', 7, 120000, 0, 65535, 0.0, 16383.75, 0.026179938779915, 0.0, 'RPM', 'RPM'],
[15, 16, 1, '%', 7, 120000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Accel Pos', 'Accel Pos'],
[16, 16, 1, '%', 7, 250000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Clutch Pos', 'Clutch Pos'],
[17, 16, 1, '%', 7, 100000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Brake Pos', 'Brake Pos'],
[18, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'LF Tyre Pressure', 'LF Tyre Pressure'],
[20, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'RF Tyre Pressure', 'RF Tyre Pressure'],
[19, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'LR Tyre Pressure', 'LR Tyre Pressure'],
[21, 9, 5, 'kPa', 7, 10000000, 0, 255, 0.0, 1020.0, 4000.0, 0.0, 'RR Tyre Pressure', 'RR Tyre Pressure'],
[22, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'LF Tyre Temp', 'LF Tyre Temp'],
[24, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'RF Tyre Temp', 'RF Tyre Temp'],
[23, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'LR Tyre Temp', 'LR Tyre Temp'],
[25, 4, 1, '°C', 7, 10000000, 0, 255, -20.0, 107.0, 1.0, 253.14999999999998, 'RR Tyre Temp', 'RR Tyre Temp'],
[26, 0, 0, '', 1, 250000, 0, 15, 0.0, 15.0, 1.0, 0.0, 'Gear', 'Gear'],
[27, 4, 1, '°C', 7, 5000000, 0, 255, -40.0, 215.0, 1.0, 233.14999999999998, 'Trans Oil Temp', 'Trans Oil Temp'],
[28, 16, 1, '%', 7, 1000000, 0, 255, 0.0, 100.0, 0.00392157, 0.0, 'Fuel Level', 'Fuel Level'],
[29, 2, 1, 'ltr', 7, 5000000, 0, 4095, 0.0, 511.875, 0.000125, 0.0, 'Fuel Capacity', 'Fuel Capacity'],
[30, 7, 1, '°', 7, 100000, 0, 65535, -180.0, 180.0, 0.0010908307824964562, -35.744343080843876, 'Steering Angle', 'Steering Angle'],
[31, 1, 4, 'km', 15, 50000000, 0, 2147483647, 0.0, 33554431.0, 15.625, 0.0, 'Distance', 'Distance'],
[32, 3, 3, 'kph', 7, 1000000, 0, 32767, 0.0, 511.0, 0.0043402777777777814, 0.0, 'Speed', 'Speed'],
[33, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'ABS Active', 'ABS Active'],
[34, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Traction Control Active', 'Traction Control Active'],
[35, 0, 0, '', 1, 200000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Vehicle Stability Active', 'Vehicle Stability Active'],
[36, 0, 0, '', 1, 1000000, 0, 16, 0.0, 16.0, 1.0, 0.0, 'Corner Exit Setting', 'Corner Exit Setting'],
[37, 0, 0, '', 1, 120000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Speed Request Intervention', 'Speed Request Intervention'],
[38, 0, 0, '', 1, 120000, 0, 1, 0.0, 1.0, 1.0, 0.0, 'Speed Control Response', 'Speed Control Response'],
[39, 8, 1, 'rpm', 3, 120000, 0, 1023, 0.0, 8184.0, 0.83775804095728, 0.0, 'Engine Speed Request', 'Engine Speed Request'],
[40, 15, 0, 'Nm', 7, 250000, 0, 4095, -848.0, 1199.5, 0.5, -848.0, 'Engine Torqure Req', 'Engine Torqure Req'],
[41, 11, 0, 'V', 7, 1000000, 0, 255, 3.0, 28.5, 0.1, 3.0, 'Battery Voltage', 'Battery Voltage'],
[42, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Lateral Acceleration', 'Lateral Acceleration'],
[43, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Longitudinal Acceleration', 'Longitudinal Acceleration'],
[44, 10, 1, 'G', 7, 2000000, -32768, 32767, -97.0, 97.0, 0.02884331898, -1890.2757212919998, 'Vertical Acceleration', 'Vertical Acceleration'],
[45, 7, 1, '°', 7, 2000000, 0, 42, -90.0, 90.0, 1.7453292519943297e-09, 0.0, 'Latitude', 'Latitude'],
[46, 7, 1, '°', 7, 2000000, 0, 42, -180.0, 180.0, 1.7453292519943297e-09, 0.0, 'Longitude', 'Longitude'],
[47, 1, 0, 'm', 7, 2000000, -3000000, 3000000, -30000.0, 30000.0, 0.01, 0.0, 'Altitude', 'Altitude'],
[48, 7, 1, '°', 7, 2000000, 0, 36000, 0.0, 360.0, 0.000174532925199433, 0.0, 'Heading', 'Heading'],
[49, 0, 0, '', 1, 2000000, 0, 99, 0.0, 99.0, 1.0, 0.0, 'GPS Fix', 'GPS Fix'],
[50, 0, 0, '', 1, 0, 0, 1000, 0.0, 1000.0, 1.0, 0.0, 'Beacon', 'Beacon']
]


I'd be willing to provide the python I used to get here, if anyone wants it.

oosheixe

i'm interested in the python code you mentioned

would you go ahead and just attach it rather than PM?
that way others can benefit as well

jparrish88

Here's the MRLV decoded. I didn't spend time yet to decode the date and time stamps for their corresponding ISOs.

[[b'id  ', b'strs', ''], [b'time', b'time', '21-32-23'], [b'date', b'date', '2020-05-13'], [b'tstm', b'tstm', [4658689210913863680]], [b'ltim', b'time', '21-32-23'], [b'ldat', b'date', '2020-05-13'], [b'zone', b'strs', 'UNK'], [b'swvs', b'strs', '23258874AQ 0.1'], [b'lang', b'strs', 'en-US'], [b'cntr', b'strs', ''], [b'unit', b'focc', 'usim'], [b'flap', b'tstm',
  • ], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', ''], [b'    ', b'strs', '']]

jparrish88

Here are the two files I used for just working with the files that were already attached to this Forum Topic. I eventually plan to have this operate out of one file and directly parse from a video themselves. But I'm not there yet, and I wasn't sure how useful it would be yet until I fully understood how to grab each .dat file.

I put an MIT as it's compatible with Phil's license on EXIF.