Lap time differences between Porsche Track Precision and Serious-Racing

Tom Haddon 26 Oct 2019

One of our users emailed us recently with the question of whether we could support the Porsche Track Precision app. We're always keen to support as many apps and devices as we can, so we happily set about the task of getting the Porsche data to work. That's when we encountered an interesting issue...

This post is going to be quite a technical one; if you just want to start uploading your Porsche laps, you can find out how to export laps from the Track Precision app on our help page.

We always try to add support for new apps and devices, because Serious-Racing is a platform where users from all different parts of motorsports come together to compare data, learn from each other, and have fun while doing so. When trying to determine if we can support a new app or device, there are two main questions.

1. Can we read the data?

If the data is in a human-readable format, such as comma-separated values (CSV), then it's pretty straightforward. If it is in a binary format, then we'll only be able to read it if we are given the layout of the data in that file. Most files we import are CSV-based, but we do also support some in binary format, such as session exports from RaceChrono.

2. Does the file contain the data we need?

The minimum set of fields we need are latitude, longitude and timestamp. Ideally we'd also have speed, although we can calculate that based on those three fields if we need to. We can only show data to the accuracy that we're given it in, so the more frequent the data points the better. Ten times a second is a good starting point; much less than that and you lose fidelity in representing someone's speed or location at any point on a track. GPS accuracy is obviously key, so having a good GPS receiver is very important. For phone apps, using an external GPS device such as a Garmin Glo and then connecting that via Bluetooth to your phone is a good option.

In order for lap times to match up on Serious-Racing with the app or device we're receiving data from, we need to know where the lap start/finish is, or which lap every data point is on, or some other list of laptimes for the data itself. We can sometimes calculate this ourselves based on the data we're getting, but it can be a little more involved.

In the case of the Porsche Track Precision app it turns out importing the data is very straightforward, as they have a CSV export option. Data is collected every tenth of a second, which is good. However, the data itself took a little work to understand. Let me explain by showing some data. Here's a sample from an export file, showing only the fields we care about:

Porsche Track Precision app CSV file

As you can see we have a timestamp (in milliseconds since the epoch) with data every tenth of a second. Great. And we have latitude, longitude and speed for each data point. Also great. But why is the first data point showing a "lapDistance" of 0.0 and a laptime of 100 (milliseconds)? Looking lower down in the file we this pattern repeated over again:

Porsche Track Precision app CSV file

So what we have here is the start of three new laps. Every time we see a "lapDistance" of 0.0 we know we're starting a new lap. But we then see a "laptime" of 115 for the first one, 127 for the second one, and 155 for the third one. What do we do with those? Luckily in this case we also had a screenshot from our user showing the lap times in the Porsche Track Precision app for the data export he'd sent us. We can compare the two and figure out what the discrepancies are.

Laptimes in Porsche Track Precision app

After a bit of experimentation, we determined that we could calculate the lap times by subtracting the timestamp for the last datapoint of the current lap from the first datapoint of the next lap. We would we then subtract the "laptime" value from the first data point of the next lap and add that number to the "laptime" value of the last datapoint of the current lap. Taking the second lap above as an example, we'd do this (in pseudo-code):

Porsche Track Precision lap time calculation

So why are the lap times different?

We now have our final lap time, 96.088 seconds. But then we discovered an oddity. When comparing the lap times we were generating to the lap times displayed in the Porsche Track Precision app there was a slight anomaly. Sometimes our laps differed by one hundredth of a second. What was going on?

It turns out the Porsche Track Precision app takes a lap of 96.088 seconds and displays that as 96.08 seconds. We round all lap times to the nearest hundredth of a second, as that's the accuracy we're displaying the data in, so we would display this as 96.09 seconds. 

Let's just say the Porsche Track Precision app is flattering its users a little, shall we? Or it's possible we've misunderstood the data format in some way. We'd love to work with the Porsche Connect team to address these issues.

Although our articles are completely independent, some contain affiliate links. This means that, if the linked website has a product for sale and you buy that product, we get a referral fee from the seller. This doesn’t make the price of the product any higher for you as a buyer. Doing this allows us to offset some of the costs we have running Serious-Racing.

Sign up for free

What are you waiting for?

  • Create a page for your car, bike, or kart
  • Explore tracks
  • Compare and analyse your laps
  • Add video
  • Share with friends
  • Get faster