Inspiration
Honestly, it started with the thrill of the race. We were looking at the Toyota GR Cup and thought, "Drivers have so much intuition, but what if we could back that up with hard data in real-time?" We wanted to build something that felt like having a race engineer sitting right next to you—someone who knows exactly when the gap is closing and when to make that decisive move. The "Hack the Track" hackathon gave us the perfect excuse to turn that "what if" into reality.
What it does
We built an AI-powered Race Engineer Dashboard. Think of it as a second pair of eyes that never blinks. It takes raw telemetry data from the car and instantly crunch numbers to tell you:
- Live Overtake Probability: A real-time percentage that tells you, "Hey, you have a 78% chance to pass right now."
- Ghost Mode: It overlays your current lap against the session's fastest lap so you can see exactly where you're losing or gaining time.
- Sector Analysis & G-Force Traces: It breaks down the track into chunks and visualizes your braking and cornering forces, helping you spot where you can push harder.
How I built it
We went with a Python-heavy stack because we needed speed and data processing power.
- The Brain: We wrote a custom physics engine in
src/overtake_model.pythat calculates closing speeds, braking distances, and cornering potential to derive that "Overtake Probability." - The Face: We used Streamlit for the dashboard. It allowed us to iterate fast and get beautiful, interactive charts up and running quickly.
- The Data: We used Pandas to wrangle the CSV telemetry data, cleaning it up and feeding it into our model in real-time chunks to simulate a live race environment.
Challenges we ran into
Oh, where do I start?
- The "Blinking" Map: At first, our track map would refresh completely every time the car moved, making it look like a strobe light. We had to figure out how to efficiently update just the car's position without redrawing the whole track every split second.
- Physics is Hard: Calculating a realistic overtake chance isn't just
speed A > speed B. We had to account for cornering radius, braking zones, and even "defending" lines. Tuning those weights to feel "right" took a lot of trial and error. - Data Gaps: Real-world data is messy. We had to build robust error handling for when the telemetry dropped a frame or gave us weird null values so the app wouldn't crash mid-lap.
Accomplishments that we're proud of
I'm really proud of the Overtake Algorithm. Seeing that percentage number change dynamically as the "hero" car closed the gap on the "rival" felt like magic. Also, getting the Ghost Mode to work smoothly was a huge win—it's one thing to see numbers, but seeing two dots chase each other on the map really brings the data to life.
What we learned
We learned that context is everything in racing. A 5 mph speed difference means nothing on a straight if you're 200 meters back, but it's everything in a braking zone. We also leveled up our Streamlit skills, learning how to manage session state effectively to prevent the app from resetting itself unexpectedly.
What's next for Team Krishna
We want to take this from "simulation" to "trackside." The next step is to hook this up to a live data stream from a simulator like iRacing or Assetto Corsa to test it in the wild. We're also thinking about adding a voice interface—so the driver can just ask, "Can I pass him?" and get an immediate answer in their ear.
Built With
- python
- streamlit
Log in or sign up for Devpost to join the conversation.