Race Strategy Analysis using SciChart WPF
Tags: webdev, javascript, wpf
Published: 2024-04-05 11:03:36

<!-- wp:heading -->
<h2 id="who-are-we">Who are we?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I am a member of <a href="https://www.revolve.no/">Revolve NTNU</a>, a <strong>Norwegian Formula Student team</strong>. Every year, a group of ~70 engineering students from over 20 different fields of study, design, build and test a new racecar. The technology in these racecars is pushed to limits, and the students get to experience the full engineering cycle. After 8 months of design work and 3 months of testing, it’s time for competition. At the biggest racetracks in Europe, teams from Universities all over the world gather to find out who has developed the best racecars, and who deserve to be called the best engineers.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/Nova-at-Competition.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 id="did-you-say-racecar">Did you say racecar?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Yes, we build racecars. Every year, our cars get faster, lighter and smarter. Our latest creation, called Nova, weighs in at 162.5 kg, and is equipped with a self-designed 4WD electric powertrain and a full aerodynamic package. To ensure that Nova is operating as expected, it is fitted with over 300 sensors. <strong>Using WPF and SciChart</strong>, we have been developing Revolve Analyze, a .NET application to monitor data in real time, and analyse it afterwards. During races, Nova streams sensor measurements, control system outputs and information about all electronic systems to the base station. Here everything is monitored by team members, using<br>Revolve Analyze.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/analyze_at_testing.jpg" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 id="race-strategy">Race strategy</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We have been analysing data using Revolve Analyze since 2017. This has given us a lot of insight into the behaviour of individual systems. Data analysis is important to push our technology further, and will also translate into lower lap times on the track.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Data analysis is important to push our technology further, and will also translate into lower lap times on the track.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>An area we have not explored as deeply yet, is Race Strategy. Understanding the bigger picture of energy management, driver styles, lap times and temperature development still holds a lot of potential performance. This is where we started exploring the different chart types in SciChart to create a lap-by-lap comparison tool to analyse these areas.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/dashboard_endurance.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:heading -->
<h2 id="creating-a-race-strategy-analysis-tool">Creating a Race Strategy Analysis tool</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>With a little background, and a “problem statement”, it’s time to start looking at the solution. For this problem, I have divided the solution into 3 parts:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li>Split the data into laps</li><li>Create tools for strategy analysis</li><li>Put them together to a dashboard</li></ol>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 id="split-a-log-into-laps">Split a log into laps</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>After a race, the software does not know where the first lap starts and the last lap ends. To determine this, a little help from the user is required. Due to the nature of the competition, laps can be defined in different ways. Some events run for 20 laps on a continuous circuit, others consist of two runs on a track with a separate start and finish. Therefore we present the user with a map of the track, and allow them to select the start and finish.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Using the<strong> SciChart ExtremeScatterseries, we draw a map of the track</strong>. Data is from the onboard INS, which has two GPS antennas. The user can either use some presets, or tweak the lap detection algorithm parameters to their likings. To help the user, the track has been colored after the car’s speed at each position.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/lap_generation_wizard.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>After the user double-clicks the start/finish location, the laps are generated. This is done by a relatively simple, but effective algorithm. The two parameters are used to detect crossing the start/finish and detecting the car being around halfway the lap.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The algorithm starts by finding the first time the car’s GPS signal is close to the start point. From here, every point in the log is checked. A new lap cannot be registered until the algorithm has found a point where the car is halfway around. For every time a new lap start is detected, the timestamp is registered as the end of the previous lap and the start for next.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>These timestamps are then stored for use by the plugin. When the user selects a different lap to compare, the lap data is used to find the relevant data in the database, and calculates all information for the analysis.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 id="analysis-tools">Analysis tools</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Now that the user has split the races into laps, we need to visualise key metrics that affect the Race Strategy. For this dashboard we designed four UI elements, of which three utilize SciChart charts:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li>Key metric deltas</li><li>Track maps with gradients</li><li>Metric development over race duration</li><li>Driver input and car speed trace, with distance as X-axis</li></ol>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3 id="key-metric-deltas">Key metric deltas</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>This element serves two purposes. First of all, it displays some of the important readings from the car for each of the two laps we are comparing. In addition, the user can select rows in the table to change the visualisations in the charts. The values in the table are calculated for all laps in a log on launch, meaning they can easily be updated when the user chooses different laps.<br>The elements are built up of standard WPF textblocks, in a datagrid.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/key_metric_deltas.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3 id="track-maps-with-gradients">Track maps with gradients</h3>
<!-- /wp:heading -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/track_maps.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Using the <strong>PaletteProviders</strong> <strong>available in SciChart</strong>, we have developed a tool to visualise how the car behaves over the course of a lap. To create the track maps we use three data channels.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Longitudinal and lateral GPS coordinates are used to plot the track. An additional third channel is used for coloring the track. Using the built in customisation tools, we can define a gradient using the maximum and minimum values for the gradient channel. This is then given to the ScatterMapPointMarkerPaletteProvider, which renders the chart instantly. Whenever the user selects a new row in the table, the trackmaps are updated with new scalings.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This element was actually not developed for this plugin. It has been reused from the ScatterMap plugin. Originally, it was developed for a user interface where any 2 channels from the car could be plotted against each other. A class holding a set of scatter map settings is passed to the element, which then does all calculations and renderings. This meant that implementing this map feature went very quickly. Creating reusable SciChart elements has been very useful in feature development, and this element is also used in the lap generation window.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Creating reusable SciChart elements has been very useful in feature development.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading {"level":3} -->
<h3 id="creating-a-color-scaled-track-map">Creating a color scaled track map</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I will show some code snippets that can help you create your own scatter charts with a color gradient. This can be useful for a lot of visualisations, and is a tool we use multiple places in our <a href="https://www.youtube.com/watch?v=ys4f8toUtiM">telemetry software</a>. To create such a chart, we need data from three channels: X-axis channel, Y-axis channel and a gradient channel. We will use the Y-values from each of the three channels.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Data from our race cars come in at irregular time intervals, meaning that not all data channels have the exact same timestamps. Therefore, the first step is to sample all involved channels, so that we have Y-values for the same timestamps for each channel. This is done by interpolation, using a <strong>sampling rate of 100 samples/second</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:scichart/code-snippet {"code":"private Listu003cdoubleu003e SampleGraph(XyDataSeriesu003clong, doubleu003e series, int samples)n{n    long start = (long) series.XMin;n    long end = (long) series.XMax;n    long diff = end - start;n    var data = new Listu003cdoubleu003e();n    for (var n = 0; n u003c samples; n++)n    {nttdata.Add(series.YValues[series.FindIndex(start + diff * ((double) n / (double) samples), SearchMode.Nearest)]);n    }nn    return data;n}","proglang":"language-cpp"} -->
<div class="wp-block-scichart-code-snippet"><pre class="line-numbers code-toolbar language-cpp">private List&lt;double> SampleGraph(XyDataSeries&lt;long, double> series, int samples)
{
    long start = (long) series.XMin;
    long end = (long) series.XMax;
    long diff = end - start;
    var data = new List&lt;double>();
    for (var n = 0; n &lt; samples; n++)
    {
data.Add(series.YValues[series.FindIndex(start + diff * ((double) n / (double) samples), SearchMode.Nearest)]);
    }

    return data;
}</pre></div>
<!-- /wp:scichart/code-snippet -->

<!-- wp:paragraph -->
<p>After the SampleGraph method has been executed for each of the three channels, we can start computing the colors. For the gradients, we have implemented a few options for the user. The user can choose to use a rainbow gradient, a single color gradient (light to dark), and the user can specify whether to use a local minimum and maximum or a global minimum and maximum for the scaling. Based on these choices, a color is calculated for each datapoint:</p>
<!-- /wp:paragraph -->

<!-- wp:scichart/code-snippet {"code":"private Listu003cColoru003e GenerateColorListForChannel(Listu003cdoubleu003e gradientData, GradientType gradientType, bool useGlobalScale)n{n    Listu003cColoru003e colors = new Listu003cColoru003e();n    var min = useGlobalScale ? _globalGradientMin : (gradientData.Any() ? gradientData.Min(val =u003e val) : 0);n    var max = useGlobalScale ? _globalGradientMax : (gradientData.Any() ? gradientData.Max(val =u003e val) : 0);n    foreach (double value in gradientData)n    {n        var percentage = (value - min) / (max - min);n        if (gradientType == GradientType.Rainbow)n            colors.Add(ColorTools.Rainbow(percentage, 0, 255));n        elsen            colors.Add(ColorTools.ColorGradient(percentage, gradientType));n    }n    return colors;n}","proglang":"language-cpp"} -->
<div class="wp-block-scichart-code-snippet"><pre class="line-numbers code-toolbar language-cpp">private List&lt;Color> GenerateColorListForChannel(List&lt;double> gradientData, GradientType gradientType, bool useGlobalScale)
{
    List&lt;Color> colors = new List&lt;Color>();
    var min = useGlobalScale ? _globalGradientMin : (gradientData.Any() ? gradientData.Min(val => val) : 0);
    var max = useGlobalScale ? _globalGradientMax : (gradientData.Any() ? gradientData.Max(val => val) : 0);
    foreach (double value in gradientData)
    {
        var percentage = (value - min) / (max - min);
        if (gradientType == GradientType.Rainbow)
            colors.Add(ColorTools.Rainbow(percentage, 0, 255));
        else
            colors.Add(ColorTools.ColorGradient(percentage, gradientType));
    }
    return colors;
}</pre></div>
<!-- /wp:scichart/code-snippet -->

<!-- wp:paragraph -->
<p>I have also included a snippet for calculating the rainbow gradient for each point. This min and max parameter can be used to create lighter or darker rainbows. We use the range 0 to 255, for a bright rainbow:</p>
<!-- /wp:paragraph -->

<!-- wp:scichart/code-snippet {"code":"/// u003csummaryu003en/// Generate a rainbow colored gradientn/// u003c/summaryu003en/// u003cparam name=u0022percentageu0022u003eWhere along the scale to pick the coloru003c/paramu003en/// u003cparam name=u0022minu0022u003eUsed to scale the darknes of the rainbowu003c/paramu003en/// u003cparam name=u0022maxu0022u003eUsed to scale the darknes of the rainbowu003c/paramu003en/// u003creturnsu003eu003c/returnsu003enpublic static Color Rainbow(double percentage, byte min, byte max)n{n    max -= min;n    Color c = new Color();n    if (percentage u003c= 1 / 4f)n    {n        if (percentage u003c 0)n            percentage = 0;n        //From Blue to Cyann        //G 0 -u003e G 255n        byte g = (byte) ((percentage * 4) * max);n        c = Color.FromRgb(min, (byte) (g + min), (byte) (max + min));n    }n    else if (percentage u003e= 1 / 4f u0026u0026 percentage u003c 2 / 4f)n    {n        //From Cyan to Greenn        //B 255 -u003e B 0n        byte b = (byte) (max - ((percentage - 1 / 4f) * 4) * max);n        c = Color.FromRgb(min, (byte) (max + min), (byte) (b + min));n    }n    else if (percentage u003e= 2 / 4f u0026u0026 percentage u003c 3 / 4f)n    {n        //From Green to Yellown        //R 0 -u003e R 255n        byte r = (byte) (((percentage - 2 / 4f) * 4) * max);n        c = Color.FromRgb((byte) (r + min), (byte) (max + min), min);n    }n    else if (percentage u003e= 3 / 4f)n    {n        //From Yellow to Redn        //G 255 -u003e G 0n        if (percentage u003e 1f)n        {n            percentage = 1f;n        }nn        byte g = (byte) (max - ((percentage - 3 / 4f) * 4) * max);n        c = Color.FromRgb((byte) (max + min), (byte) (g + min), min);n    }nn    return c;n}","proglang":"language-cpp"} -->
<div class="wp-block-scichart-code-snippet"><pre class="line-numbers code-toolbar language-cpp">/// &lt;summary>
/// Generate a rainbow colored gradient
/// &lt;/summary>
/// &lt;param name="percentage">Where along the scale to pick the color&lt;/param>
/// &lt;param name="min">Used to scale the darknes of the rainbow&lt;/param>
/// &lt;param name="max">Used to scale the darknes of the rainbow&lt;/param>
/// &lt;returns>&lt;/returns>
public static Color Rainbow(double percentage, byte min, byte max)
{
    max -= min;
    Color c = new Color();
    if (percentage &lt;= 1 / 4f)
    {
        if (percentage &lt; 0)
            percentage = 0;
        //From Blue to Cyan
        //G 0 -> G 255
        byte g = (byte) ((percentage * 4) * max);
        c = Color.FromRgb(min, (byte) (g + min), (byte) (max + min));
    }
    else if (percentage >= 1 / 4f &amp;&amp; percentage &lt; 2 / 4f)
    {
        //From Cyan to Green
        //B 255 -> B 0
        byte b = (byte) (max - ((percentage - 1 / 4f) * 4) * max);
        c = Color.FromRgb(min, (byte) (max + min), (byte) (b + min));
    }
    else if (percentage >= 2 / 4f &amp;&amp; percentage &lt; 3 / 4f)
    {
        //From Green to Yellow
        //R 0 -> R 255
        byte r = (byte) (((percentage - 2 / 4f) * 4) * max);
        c = Color.FromRgb((byte) (r + min), (byte) (max + min), min);
    }
    else if (percentage >= 3 / 4f)
    {
        //From Yellow to Red
        //G 255 -> G 0
        if (percentage > 1f)
        {
            percentage = 1f;
        }

        byte g = (byte) (max - ((percentage - 3 / 4f) * 4) * max);
        c = Color.FromRgb((byte) (max + min), (byte) (g + min), min);
    }

    return c;
}</pre></div>
<!-- /wp:scichart/code-snippet -->

<!-- wp:paragraph -->
<p>The last step before we can render our chart, is to perform any interpolation the user might want. For some data channels, the sending frequency is low, meaning the charts aren’t very smooth. For example in maps with few points we might want to smoothen it out. To achieve this, the X, Y and color values are interpolated with additional points.</p>
<!-- /wp:paragraph -->

<!-- wp:scichart/code-snippet {"code":"private IRenderableSeriesViewModel InterpolateDataseries(ColorType colorType, int interpolation, double[] xValues, double[] yValues, Listu003cColoru003e colors, IRenderableSeriesViewModel serie)n{n    var totalNumberOfElement = (xValues.Length - 1) * (interpolation + 1);n    double[] allXValues = new double[totalNumberOfElement];n    double[] allYValues = new double[totalNumberOfElement];n    Valuesu003cColoru003e allColorValues = new Valuesu003cColoru003e(totalNumberOfElement);nn    double start, end;nn    for (int n = 0; n u003c xValues.Length - 1; n++)n    {n        for (int i = 0; i u003c interpolation + 1; i++)n        {n            start = (interpolation + 1.0 - i) / (interpolation + 1.0);n            end = i / (interpolation + 1.0);nn            // Interpolate X and Y valuesn            allXValues[n * (interpolation + 1) + i] = xValues[n] * start + xValues[n + 1] * end;n            allYValues[n * (interpolation + 1) + i] = yValues[n] * start + yValues[n + 1] * end;nn            if (colorType != ColorType.Solid)n            {n                // Interpolate gradient colorsn                byte r = (byte) (colors[n].R * start + colors[n + 1].R * end);n                byte g = (byte) (colors[n].G * start + colors[n + 1].G * end);n                byte b = (byte) (colors[n].B * start + colors[n + 1].B * end);n                allColorValues[n * (interpolation + 1) + i] = Color.FromRgb(r, g, b);n            }n        }n    }nn    // Add data to seriesn    ((XyDataSeriesu003cdouble, doubleu003e) serie.DataSeries).Append(allXValues, allYValues);nn    // Add the gradient to the series using a PalletteProvidern    if (colorType != ColorType.Solid)n    {n        ScatterMapPointMarkerPaletteProvider palette = new ScatterMapPointMarkerPaletteProvider() {n            data = allColorValuesn        };n        serie.PaletteProvider = palette;n    }nn    return serie;n}","proglang":"language-cpp"} -->
<div class="wp-block-scichart-code-snippet"><pre class="line-numbers code-toolbar language-cpp">private IRenderableSeriesViewModel InterpolateDataseries(ColorType colorType, int interpolation, double[] xValues, double[] yValues, List&lt;Color> colors, IRenderableSeriesViewModel serie)
{
    var totalNumberOfElement = (xValues.Length - 1) * (interpolation + 1);
    double[] allXValues = new double[totalNumberOfElement];
    double[] allYValues = new double[totalNumberOfElement];
    Values&lt;Color> allColorValues = new Values&lt;Color>(totalNumberOfElement);

    double start, end;

    for (int n = 0; n &lt; xValues.Length - 1; n++)
    {
        for (int i = 0; i &lt; interpolation + 1; i++)
        {
            start = (interpolation + 1.0 - i) / (interpolation + 1.0);
            end = i / (interpolation + 1.0);

            // Interpolate X and Y values
            allXValues[n * (interpolation + 1) + i] = xValues[n] * start + xValues[n + 1] * end;
            allYValues[n * (interpolation + 1) + i] = yValues[n] * start + yValues[n + 1] * end;

            if (colorType != ColorType.Solid)
            {
                // Interpolate gradient colors
                byte r = (byte) (colors[n].R * start + colors[n + 1].R * end);
                byte g = (byte) (colors[n].G * start + colors[n + 1].G * end);
                byte b = (byte) (colors[n].B * start + colors[n + 1].B * end);
                allColorValues[n * (interpolation + 1) + i] = Color.FromRgb(r, g, b);
            }
        }
    }

    // Add data to series
    ((XyDataSeries&lt;double, double>) serie.DataSeries).Append(allXValues, allYValues);

    // Add the gradient to the series using a PalletteProvider
    if (colorType != ColorType.Solid)
    {
        ScatterMapPointMarkerPaletteProvider palette = new ScatterMapPointMarkerPaletteProvider() {
            data = allColorValues
        };
        serie.PaletteProvider = palette;
    }

    return serie;
}</pre></div>
<!-- /wp:scichart/code-snippet -->

<!-- wp:paragraph -->
<p>At the end of the interpolation, the data is added to the series, and the colors are used to create <strong>a ScatterMapPointMarkerPaletteProvider</strong>. This is a SciChart class, used to provide the chart with the gradient. Simply setting the series PalletteProvider to our instance of the ScatterMapPointMarkerPaletteProvider will render our gradient when the series is added to the surface.</p>
<!-- /wp:paragraph -->

<!-- wp:scichart/code-snippet {"code":"// Add the gradient to the series using a PalletteProvidernif (colorType != ColorType.Solid)n{n    ScatterMapPointMarkerPaletteProvider palette = new ScatterMapPointMarkerPaletteProvider() {n        data = allColorValuesn    };n    serie.PaletteProvider = palette;n}","proglang":"language-cpp"} -->
<div class="wp-block-scichart-code-snippet"><pre class="line-numbers code-toolbar language-cpp">// Add the gradient to the series using a PalletteProvider
if (colorType != ColorType.Solid)
{
    ScatterMapPointMarkerPaletteProvider palette = new ScatterMapPointMarkerPaletteProvider() {
        data = allColorValues
    };
    serie.PaletteProvider = palette;
}</pre></div>
<!-- /wp:scichart/code-snippet -->

<!-- wp:heading {"level":3} -->
<h3 id="metric-development-over-race-duration">Metric development over race duration</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Visualising a metric over the course of a lap can give some good insights into the car through specific corners and straights, but for a Race Strategy to be understood we also need to see it develop over the course of the entire race. To visualise this, we implemented a histogram chart.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For each row the user selects, the histogram will update to show that metric for every lap of the two races. This can give useful information about energy regeneration and usage or the development of lap times.</p>
<!-- /wp:paragraph -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/energy_histogram.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Drivers can use these <strong>histograms to compare their driving styles</strong>. One discovery we made was the big difference in coasting time for our 2 drivers. Coasting occurs when a driver isn’t pushing any of the pedals, so no acceleration input. Here it was discovered that even though driver A coasted a lot more than driver B, their lap times were comparable. This then led to some discussions and experimentation on pedal inputs during the next testing days to find the best way to operate the car.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Visualising the driving styles in histograms gave us ideas to experiment with pedal inputs to find the best way to operate the car. &nbsp;</p></blockquote>
<!-- /wp:quote -->

<!-- wp:heading {"level":3} -->
<h3 id="driver-input-and-car-speed-trace">Driver input and car speed trace</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The last tool that was added to the dashboard was a <strong>visualisation of the car’s speed and the driver’s input over the course of the lap</strong>. Since not all lap times are identical, time is not always the best unit for X-axis. Instead, we converted the x values to distance into the lap. Using the speed measurement, and their timestamps, we integrated the velocity to get an approximation of distance travelled. This was then used as the XValues in the XyDataseries that make up the line charts. Visualising the speed over two laps, can give a clear indication of where on the track time is gained and lost. This can be seen in the top chart. In this example, the yellow data is from the first AutoX attempt, and the blue is the last AutoX attempt. It’s clear that the last attempt kept a higher speed throughout most of the lap.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Visualising the speed over two laps, can give a clear indication of where on the track time is gained and lost.</p></blockquote>
<!-- /wp:quote -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/speed_driver_trace.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/driver_trace_zoomed.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The bottom chart shows the drivers pedal inputs. The bright lines are the brake pedal inputs, the dimmer ones are the acceleration pedal. One thing you will quickly notice is that the driver doesn’t put the throttle all the way down. One reason for this is to<strong> conserve energy</strong>, as efficiency is 10% of the overall competition score. This becomes even clearer when zooming in on the traces. The bright lines follow the brake pedal, and the dimmer lines represent the throttle.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 id="conclusion">Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:image -->
<figure class="wp-block-image"><img src="https://www.scichart.com/wp-content/uploads/2020/09/dashboard_autox.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The Lap Comparison dashboard has given us a quick and efficient way to understand how strategic choices affect overall performance. All charts work together to paint the bigger picture of motor racing. Drivers have learned from each other's styles, electrical engineers have learned more about the relationship between energy usage and lap times, and the vehicle dynamics engineers have discovered how to adjust control systems to allow each driver to use their own style. This is possible both for Endurance races with 20 laps and for the shorter AutoX races with 2 laps.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Learn more about the Revolve NTNU team from the videos:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><a href="https://www.youtube.com/user/RevolveNTNU/">Revolve NTNU's Youtube channel</a></li><li><a href="https://www.youtube.com/watch?v=ys4f8toUtiM">Telemetry demo video</a></li><li><a href="https://www.youtube.com/watch?v=-7POUxcpiBM">2019 Unveiling video</a></li><li><a href="https://www.youtube.com/watch?v=_2T3MFnWG7A">Atmos Driverless demo</a></li></ul>
<!-- /wp:list -->

<!-- wp:html -->
{% embed https://www.youtube.com/embed/ys4f8toUtiM %}
<figure class="kg-card kg-embed-card kg-card-hascaption">
<figcaption>Check out the INSANE acceleration of the Revolve NTNU Formula-Student car, with telemetry tracked in real-time by SciChart WPF.</figcaption>
</figure>
<!-- /wp:html -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2 id="about-scichart-high-performance-realtime-charts">About SciChart: High Performance Realtime Charts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><em>SciChart (<a href="https://www.scichart.com">www.scichart.com</a>) provides high performance real-time chart components on the WPF (Windows), iOS, macOS, Android and Xamarin platforms and soon JavaScript for web. SciChart is already used across the globe in a wide range of domains. We now cater to a loaf of global MedTech companies, top US Banks, Top Global Petrochemical companies, and thousands more. It is also used by several top Formula One (F1) Teams worldwide.</em></p>
<!-- /wp:paragraph -->