Sharing PDR files
Would any of you track guys be interested in sharing raw PDR files? I know we post video links to fast laps, but sharing the actual PDR files through an FTP or cloud service could be pretty cool with the Cosworth Toolbox. For example, I'd love to load my 2:29:09 Sebring lap and compare it to Sean's 2:18 using the reference recording option to compare throughout the lap.
Something like Google Drive or a multitude of other services could allow sharing of large files. We really only need the fastest lap file for each track available for download.
Last edited by spearfish25; Dec 13, 2016 at 11:52 AM.
I have the URL, but not the software that will work. I am also trying to figure out a way extract the data from the MP4 file so I could make a web interface. link
If this seems like an idea worth pursuing, I can put some time into it. Otherwise I can create a dropbox account, and invite people to share files that way.
No question that being able to extract data from or simply trimming the raw PDR files while keeping the embedded data would be ideal. I'm stuck with dozens of PDR files that have tons of sitting in the paddock or pit lane that I can't edit without losing all the Cosworth data.
Last edited by spearfish25; Dec 13, 2016 at 11:51 AM.
You would likely lose all Cosworth data though, but I'm not 100% sure on that. They do post-process the video for their own servers so I've got to assume it's gone, even though it's stored out of band.
How important is it to get the raw data from the video rather than the video itself?
Last edited by spearfish25; Dec 13, 2016 at 12:53 PM.
I'd suggest OneDrive, as I've been using it for years on the PC, Mac, and iPhone (and I'm nostalgic about the Win95 Briefcase). Or Google Drive.
I have a 1TB account on OneDrive and would be happy to share some of that space, I'm just worried that my "bonus storage" could go away and the data be lost if I forget to renew, and so on. But if worse comes to worse, ping me!
The Best of Corvette for Corvette Enthusiasts
Bitorrent is also a potential P2P solution, but I think it would be more disorganized by nature.
I have the URL, but not the software that will work. I am also trying to figure out a way extract the data from the MP4 file so I could make a web interface. link
If this seems like an idea worth pursuing, I can put some time into it. Otherwise I can create a dropbox account, and invite people to share files that way.
How much progress have you made in extracting the data? Id really love to find a way to do better analysis.
2 months ago I hit the "define finish line" button right at the NASCAR S/F line on the front stretch of the tri-oval. However, when reviewing the videos the lap times didn't seem to be recording the end of lap right at the NASCAR S/F line - close, but not exactly where I thought I pushed the button.
Last weekend I tried to redefine the PDR finish line right on top of the NASCAR S/F line that's painted across the track. I didn't have anybody behind me, so I slowed to around 60-70 mph and hit the button right at the finish line on the track.
However, the PDR finish line STILL isn't right where I wanted it!!

Here's a screenshot of Toolbox showing the "blue" dot and line from the December PDR video, and the "gold" dot and line from October:
In the picture above I moved the "cars" an instant ahead from the beginning of the lap, and you can see the "reference lap" in gold has its finish line designated on the map by the checkered line across the track - and the "car" (gold dot) is slightly down the track from there. The blue lap's finish line is a similar distance behind the blue dot, and if you look close you can see a "break/gap" in the blue line where the S/F line for the blue car was designated in the PDR video. They are NOT in the same place, even though I tried to designate them right at the same place on the track.
And the actual NASCAR S/F line is down track a couple hundred feet in front of the gold dot - you can see a line across the track. And that's what I tried to designate as the PDR finish line for both recordings.
The speeds across the NASCAR S/F line in both of these laps were very similar, but if you look at the comparison data it looks like there's quite a difference in speed, etc. because the cars are in different places on the track. The blue dot and gold dot look to be past their respective S/F lines by about the same distance, but they're far enough apart that speed, steering input, etc., etc. are quite different.
When I look at a corner, the gold car/dot is always out in front of the blue car/dot. If the lap data started at exactly the same S/F line then they'd be going around T1 at almost exactly the same time, and all the data would be easy to compare.
However, because the S/F lines are different, the two dots/cars are much harder to compare to each other.
I got a PDR video from Butch M (it takes a looooong time to download a 30 minute file!!
) who was at the Dec event last weekend - we wanted to compare how we were doing reference each other. Problem is, Butch set his S/F line right after coming out of the pit out lane and onto the track - and this is an entirely different place than mine is:
In the picture above you can see a small gap in the blue line right behind the blue dot (my car) - I'm just past MY line. For Butch's gold dot, his S/F line is the checkered line across the track just behind his car - and he is likewise just past HIS line.
We are both in STRAIGHT 1 - at least reference our own S/F lines!! You can see a huge speed delta between the two cars because they aren't anywhere near each other on the track - so you can't do any good comparisons using the Toolbox info.
Bottom line:
- I don't know why there's not a better way to "define the finish line" for PDR videos.
- If you're going to compare your own videos that have the EXACT same S/F line, then you'll be okay. If your videos have slightly different S/F lines (like my Oct and Dec files) you probably will still be pretty much okay with just a little bit of interpretation. You'll have the same problem comparing your files with your buddy's - your S/F lines will probably not be in exactly the same place, unless you can stop on the track with your front wheels right on the exact same place, such as the actual S/F line of the track.
- If your buddy uses a totally different S/F line from yours, you'll have the problem that I have trying to compare my laps to Butch's.

.




I imagine the system is using a GPS refresh rate of 5 times per second. At 120 mph that means the car is moving at 176 ft per second. Dividing that by 5 means you get a sample of the position every 37 ft. On top of that you have a certain amount of GPS error (+/- X amount of feet per reading). That may be what you are fighting when trying to define the S/F line exactly to the track S/F line.
As far as where the data stream is located in the Cosworth MP4 file I don't know. Using a couple of editing tools including Race Renderer3 I loaded the Cosworth MP4 files into the tools and saved the complete file using the tool. When I tried to open those saved files with Cosworth it couldn't recognize the files and said there was no data in them. Whatever the stream is standard editing tools strip it out of the file. Race Renderer can merge video files with a data stream so you can see data when a video is played. I used to use Trackmaster to collect data on my Android phone and when I looked at the data captured it was nothing but a list of GPS location points per lap. The software would put a number for the lap when it detected a GPS location within a short distance of the recorded S/F line. If the car didn't pass within a certain range of the location recorded it wouldn't update the lap counter and you could get 7+ minute laps that consisted of 3 actual laps. I am attaching an Xpel CSV file showing the Trackmaster video data file which is output in csv format and then merged into a video using tools like Race Renderer. The Cosworth data has to be similar to this but I don't know of a tool that can be used to see where it is located in the MP4 file output by Cosworth.
Bill
Last edited by Bill Dearborn; Dec 16, 2016 at 01:29 PM.
<?xml version="1.0"?>
<gpx version="1.0" creator="Marlin Track Mapper" xmlns="http://www.topografix.com/GPX/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<bounds minlat="29.1786740000" minlon="-81.0748906667" maxlat="29.1915110000" maxlon="-81.0625641667"/>
<trk>
<name>Marlin Track Map</name>
<cmt>marklatdegs="29.1876763333" marklondegs="-81.0727703333" markcourse="216.9700000000" numpoints="824"</cmt>
<trkseg>
<trkpt lat="29.1876763333" lon="-81.0727703333">
<ele>7.600000</ele>
<time>2016-12-09T14:04:52.20Z</time>
<course>216.97</course>
<name>point 1</name>
</trkpt>
<trkpt lat="29.1876411667" lon="-81.0727995000">
<ele>7.600000</ele>
<time>2016-12-09T14:04:52.40Z</time>
<course>216.23</course>
<name>point 2</name>
</trkpt>
<trkpt lat="29.1876061667" lon="-81.0728286667">
<ele>7.600000</ele>
<time>2016-12-09T14:04:52.60Z</time>
<course>215.81</course>
<name>point 3</name>
</trkpt>
<trkpt lat="29.1875710000" lon="-81.0728568333">
<ele>7.600000</ele>
<time>2016-12-09T14:04:52.80Z</time>
<course>215.08</course>
<name>point 4</name>
</trkpt>
<trkpt lat="29.1875355000" lon="-81.0728846667">
<ele>7.600000</ele>
<time>2016-12-09T14:04:53.00Z</time>
<course>214.31</course>
<name>point 5</name>
</trkpt>
<trkpt lat="29.1874995000" lon="-81.0729120000">
<ele>7.600000</ele>
<time>2016-12-09T14:04:53.20Z</time>
<course>213.46</course>
<name>point 6</name>
</trkpt>
<trkpt lat="29.1874630000" lon="-81.0729390000">
<ele>7.600000</ele>
<time>2016-12-09T14:04:53.40Z</time>
<course>212.82</course>
<name>point 7</name>
</trkpt>
I assume that info is in the .mp4 PDR video file as well.
Once you "define the finish line" (and I guess the entire track) for a track during your first session, you don't need to do it again. I wonder if subsequent sessions somehow use that .map.gpx file for their position recording?

It sure would be nice if that were the case. If so, after someone ran a particular track and had defined the finish line for that track, perhaps they could pass that .map.gpx file on to other drivers who could put it onto their SD card, and then they wouldn't need to define the finish line. The file for the 3.56 mile Daytona Rolex course is only 166 KB. They would have the finish line and track points already on their SD card, and everybody who used that particular finish line would be able to compare their videos to other driver's videos and would have the exact same S/F line.
The end of the .map.gpx file appears to be at the same place as the defined finish line (which may actually be the "start" line for all the points on the track). It looks like it's one complete lap. I don't know if you could go out on the track before sessions start and stop on the S/F line of the track and mark it on the PDR screen and then go directly back into the pits, or if you'd need to make a complete lap in order to generate all those other points.
I wish the PDR programmers had given us a little more info about this S/F line, and made it easier to mark it. On my Traqmate I just had to enter a lat/long (and maybe a heading/course - I can't remember), but it was nice to do a precise location at home on your memory card before you even went to the track.
Bob
Last edited by BEZ06; Dec 16, 2016 at 03:12 PM.
What we need is for someone to write a tool to extract that stream from the file and more importantly to understand how that data is formatted so that we can extract meaning. The first part is pretty reasonable but the latter might be impossible without some sort of specification from GM or Cosworth and even then would likely take a lot of coding unless they provide an SDK.
I did find a thread on another forum where someone wrote a Python script to extract the GPS data from a dashcam MP4. This particular dashcam was storing the GPS data in a stream in the MP4 like the PDR does with its data. I haven't pulled the script to look at it as I really don't know Python but someone might want to.
https://dashcamtalk.com/forum/thread...tek-mp4.20808/
The .gpx file that is on the SDK car is just the "track map". If I had to guess, it's loaded in to memory by the PDR when you are recording and is used to know when to reset the lap timer to 0.00 and also to draw the track map on the video. Given the ability to extract the data from the MP4 stream, interpret it, and manipulate it, you might be able to patch up the lap data but without understanding the data there is no way to know for sure.












