Automated Data Summary - Export Reports from AIM race studio

Hey everyone, I figured I might as well start getting some input on a side project I’ve been working on. Long story short, I think my real hobby is data/over-thinking, and I just happen to use a go-kart as the vessel. I wanted to create an automated tool that takes as little user input as necessary and kicks out a breakdown of what most of us probably look at when it comes to data. The PDF format is great for comparing results since you can flip through the pages quickly or flip between multiple PDFs. I also print them out and keep them in my setup binder for reference later without having to grab a laptop.

User Inputs:

  • list of CSV files from Racestudio3 (I’m trying to get XRV files to work directly and have a way to do it, but I haven’t gotten it to work yet. I haven’t tried Alfano data yet)
  • Kart weight for power calculation
  • Reference hp and rpm if available
  • Which laps to look at (best lap, best n laps, or laps #n)
  • Which parameters to look at like rpm, speed, lateral Gs, etc.
  • Lap segments defined from lap fractions (so like 0.2, 0.5, and 0.7)
  • Color map schemes
  • Variable selections

Once the defaults are set, running a new breakdown is just a matter of pointing it to the right files.

Full PDF linked at the end, but here are some screenshots:


First Page (Summary):

  • Date and time from each selection session
  • calculated lap times for which laps are picked
  • Wind speed and direction. All weather data is pulled automatically using the weather station nearest to the start/finish line during the session. This is used for the SAE correction factor as well, so there’s no requirement to log and enter the weather during the test
  • Track paths for each session and marks for lap fractions
  • Data grid showing plots of the selected variables. The DPI is very high, so you can actually zoom pretty nicely on either the phone or Adobe

Next Pages (Session Breakdown):

  • Creates a table of segment times, total lap time, theoretical (sum of bests), and min speed. With Briggs 206, there’s not much point in doing a max speed, but I still want to add that for other classes that aren’t rev limited like my daughter’s Kid Kart. It also shows average for each column and standard deviation, and the title of the table includes weather conditions I pulled from the data coordinates and time.
  • Track diagram is colored by a user-selected variable. In this case, longitudinal Gs so I can see braking points, max forward acceleration, stuff like that. It also has a colored dot showing the start of each segment and 0.1 increment hash marks for normalized distance.
  • G circle. Pretty self-explanatory.
  • Segment-wise breakdowns. This shows the speed in mph colored by the absolute value of lateral Gs.

Last Page (Powertrain summary):

  • This is actually what started this whole mess. I wanted to see if I could quantify clutch changes. I appreciate the sentiment behind “the stopwatch doesn’t lie”, but it also doesn’t tell the full story. It is more like the fable of the five blind men describing an elephant, so I wanted something that could rule out as many external factors as possible, including the driver.
  • I also chose to plot by speed instead of rpm, so you can try gearing changes and see how it changes performance at different kart speeds. At lower rpm where the clutch may be slipping, power vs. rpm doesn’t make much sense since the rpm are not proportional to speed while it slips.
  • I show wind on this page because I have found strong headwinds to really show up in the data for 206. Under the hood, I am using total airspeed for the drag calculation, so headwinds and tailwinds are accounted for. I haven’t yet, but I guess I could also pull in air density for how it plays with drag.
  • The outline of each dot shows what session it is from, the fill color shows how much clutch slip is calculated, and the size of the circle reflects the uncertainty (big circle = lots of noise/spread). I divide the power I calculate by what the reference power is, so 1 is expected, higher than 1 is better than expected, and lower than one is bad. This is all corrected by an assumed drivetrain loss, humidity, temperature, and pressure, so I am more than a bit bummed by my results. Either my math is wrong or my engine sucks or something is robbing power. For the example here, I am using my daughter’s data, and I don’t have her dyno plot. I used to, but I misplaced it apparently… Since I don’t have a reference, it actually just shows the calculated power. I need to update the description of the plot better.

Bottom Line:

  • There are a couple bugs and features I am working through, but for the most part, it works pretty well for my specific use. I want to work on expanding that though and making it flexible for other tracks and classes. I have played with my daughter’s KK data, but otherwise I haven’t pushed it much outside of GoPro and us two.
  • A few little things like formatting, placement of different things, fonts, etc
  • I’d love to get input on what people think. I see potential for some mutual backscratching - if you have data files you don’t mind me seeing, I’d love to try to break my script and validate my math. Especially if you have dyno + track data, I can really confirm or correct my power calculation. I don’t have to know anything about the setup you ran other than the total weight since I pull the rest of what I need from the data. In turn, you get a PDF of everything. I’m still on the fence about showing the script itself since it lacks a tremendous amount of polish, but I might once I get a GUI to work. That’ll take a while though since I have to learn how to do that first…
  • Adobe PDF reader is far better than Foxit. Foxit does not cache the data, it seems, so each time you change pages it has to redraw. There’s a lot to draw here, so that got annoying fast. Adobe caches everything up front a lot better, so once it draws all the pages, they flip back and forth instantly. I have not tried other readers, so I am curious how others work, especially on Linux or Unix or Android. iPhone seems to work well, I just wish it didn’t scroll continuously across pages. iPhone didn’t display the same as Adobe at first, so I fixed some things. I’m curious how it works for other people.

Here’s the PDF itself, so feel free to pull it down and let me know how well it works or not. I figure y’all will be kinder if I show a 5yo’s data rather than my own, haha. I am very happy with how this is turning out, but I’d appreciate any constructive criticism from fresh eyes, especially since everyone attacks data from different angles, and this might be missing some obvious things to others.

Summary.pdf (2.5 MB)

4 Likes

Just plain old wow! :crazy_face::nerd_face::sunglasses:

Quoted for emphasis. Faster or slower is fine, but why…

I like it a lot. I’d like to use it.

My comments:

  • You may need a legend, so that you know which lap each data is from, or if you have multiple drivers, which driver it is.
  • The GPS map, its more useful directly from above.
  • The power/torque curve chart would be nice.
  • Compress it, the file is too big.

Thanks for the feedback! I actually did have the lap number in the legend on the summary page, but I dropped it to make room for the windspeed and direction. I think I have room for both though, and I also want to add the year to the month and day as well as drop the month to three letters.

Not sure what you mean by the second comment. I keep the coordinates how they are in RS3, so it is the same orientation there and in google maps.

I look into my compression options and see if I can flatten it that way. If I can do it cleanly without losing resolution, it will be a big help.

Maybe I’m looking at it wrong but it looks like it’s a 3/4 view of the gps rather then a plan view.

I’m not actually trying to treat the projection perfectly correctly. As you move up in latitude, it gets a little distorted. I’ll correct that.

There ya go! From what I understand, google maps uses Mercator projection, or some modified form of it. Using Mercator instead of Orthographic makes the track look more like what you are used to seeing in google or those kinds of maps.

1 Like

Google uses a web mercator (WGS84) coordinate system. At the scale of kart tracks, I suspect as long as the data is collected from the Mychron/Alfano in Mercator WGS84 and the data is displayed in the same coordinates system everything should line up correctly, allowing for the number of satellites of course. The more satellites the better. Here’s the Wikipedia link if you want to get into the weeds on the formulas for the projection. Web Mercator projection - Wikipedia

1 Like

Love this! RS2/RS3 are super powerful but I have always wanted a super quick report summary option.

Alrighty, I finally made some really good progress with this and tested it out at the track a couple days ago. I’ve uploaded the program as well as a ReadMe and PDF example to this google drive:

https://drive.google.com/drive/u/0/folders/1wJwTY6499bquBoYIXdFq2OO6lqVhw-W2

The ReadMe breaks down everything (it looks like a lot, but I think it makes sense when you dive in), but the gist is this. The first time you run it, it looks for all the AIM data files in their normal place then puts them in an Excel sheet. It also looks up stuff like the weather for the session, max rpm, max speed, best lap time, etc. In this sheet, you mark which runs you want to plot in the PDF summary. To get the weather history, you’ll need internet access (so make sure you connect back to wifi after connecting to the MyChron to pull down data).

There’s another sheet that is used to set the basics like which variables you want to look at, how to set the color min/max, stuff like that. This one doesn’t need to be used every time, just to get it to plot how you like.

When you run the code, it asks you what mode you want to run - find new files to add to the list, plot the ones you’ve already picked out of the list, find new ones and only plot them, or find new ones and plot them with the ones you’ve already picked. You can also pick which file to use for the reference in the laptime delta. When it makes the PDF, it checks for a topography file I create when it cannot find one for the given track layout. This also needs internet access (it pulls the data from USGS) and can take a minute, but it doesn’t have to go through this every time. It just needs to do it the first time for each layout, so make sure the track names are consistent or it’ll think they are different layouts.

If you’re interested in trying it out, read through the ReadMe and give it a shot. I did set a self-destruct so it’ll stop working at the end of the month. That’s the only way I can get this particular cat back into a bag if I decide to, but I don’t see that happening. Still, if I didn’t set the timer, there wouldn’t be a way to change my mind later.

The big caveat - this is my first attempt at compiling Python code into an executable, and I’m not a developer. I just use software tools as a means to an end, and my coding very much reflects that. You’ll probably break the code, but I don’t think it’ll break your computer. I’ve done my best to make it work right, but no promises.

Here’s an example of my 5yo daughter’s data (so y’all don’t laugh at my driving, haha). I think this tool could be super helpful for parents/teams who need to look at more than one driver each session, so this way you can overlay them and see how they compare.

The horsepower calculation is still very much in development. There’s a lot of logic I still need to add, so it is mostly useful right now for just qualitative stuff rather than anything exact.

4 Likes

This looks killer. I’ll run some of my data through this in the coming days to get familiar with it and relay some feedback.

Thanks! Biggest thing I am curious about is the process of getting it running. I don’t know if there will be issues running on Windows 10, for example, or if the initial instructions make sense. I may try to make an installer that does the initial setup for you, but I wanted to see if that’s really needed yet or it is just another can of worms to open. I also think the input prompts make sense and work well, but I’ve been staring at it for a while. Fresh eyes may say “why in the world don’t you just do this …?” for something I have missed.

I also only have a limited number of data channels right now since I can’t test a lot of them like CHT or water temp. If you have XRK files with those channels (or throttle, steering, etc), then I can use those files to expand support for those channels.

1 Like

This is super cool! Nice work. Yet another thing that makes me wonder why AIM hasnt figured this out natively!

Side note rant:
One of my biggest wishes is that there was a truly open source and active project developing software that can import data files from different loggers (AIM, Alfano, Starlane, etc) and then do your basic, commonly performed analysis tasks. It is absolutely crazy that AIM doesnt have a Mac application or any mobile applications in 2024. The exact use case of Racestudio is using it away from home at the track! Their devices support wireless data transmission over wifi, why they don’t have mobile apps beats me? It is up to other people (like LapSnap) to develop their own software that does what Racestudio and AIM refuses to do.

I know Racestudio has been around for a very long time and it can be super powerful. But everything about that software is confusing and tedious. Having to have both RS2 and RS3 in order to be able to do everything you might need to do is crazy. Their entire approach to workflow, data management, UI, documentation, etc is deeply flawed in my opinion. The fact that the only real way to figure out how to do something in RS is to sift through hundreds of 1hr+ youtube videos hoping one talks about what you are trying to do is asinine.

So anyway, I’m here for anyone who is trying to “roll their own” in the hopes that someday, I might never need to touch RS3 again lol. If I didnt get my Mychron5 with my used kart, I would 100% be using a different logger. Probably Alfano simply for the mobile app. The Starlane Corsaro devices look interesting too and they have software for Windows, Mac, Android and IOS. I’ve even considered sticking a Racebox Mini S to my kart and using that during track days to get quick laptimes, speeds, etc readings.

I’ve used the Mini (Vs Mini S, I threw my phone in my pocket instead)with a GoPro and RaceChrono and felt it was overall pretty decent. You can’t deep dive into data as much of course.

Yeah when I’m at the track, I pretty much just want to look at sector times, corner speed, braking points, etc. Normally I look at the RPM/Speed trace in RS3 but it takes too long to boot up the computer, open RS3, finagle around with the wifi settings so I can actually connect to the Mychron, download the data, and open it in analysis.

It would be so nice if we had a stripped down app that essentially just connected to the Mychron, auto downloaded the last session and displayed a high-level summary PDF that could be saved much like OP’s is developing with his scripts! I’ve used LapSnap in the past but it is a bit buggy in my experience.

Hi Caleb, I was looking to try this out but it threw an error, would this be the post-feb self-destruct? Or user error on my side?

Also I wasn’t sure where to find the run directory, for the track & class names.

That’s a different error. It looks like it is looking for a file on my computer instead of yours, so I’ll have to rebuild it. This project has stalled lately for me, so hopefully I’ll have time to start messing with it soon. I’ve got a few updates I’ve made I need to roll out anyways.

1 Like