Skip to content

Visualization

Ted Dunning edited this page Feb 5, 2016 · 2 revisions

For the visualization, it is convenient to reduce each car's data into laps. Each lap starts when the car passes the start/finish line and continues until the end of data or the beginning of the next lap.

The visualization should render a few parameters from any lap of any of the cars in the database by plotting the parameters against distance around the track. Typical parameters would be speed, engine RPM, or current gear. If two cars are plotted at the same time, then it should be possible to plot the time difference between the two cars. The result should look something like this:

telemetry example Originally from this page

The distance around the track is not available in the simulated data, but can be derived by analysis of the reported position of the car. One possible way to do the analysis would be to sample many car positions and do a k-means clustering of the positions. The centroids from this clustering can be sorted to indicate progression around the track and a distance can be assigned to each centroid. The distance for any position can then be derived by finding the nearest two centroids and projecting the position onto the line between the centroids. That projected position can then be used to get an interpolated distance around the track. I can do the clustering and provide sample projection/interpolation code if needed.

The time distance between cars can be estimated by plotting time since the last pass of the start/finish line on the y-axis for each car versus distance on the x-axis and subtracting.

Clone this wiki locally