Project Title: GR Cup Racing Academy

Tagline: Turning raw telemetry into racing mastery with a 3D Digital Twin.

Inspiration

Racing telemetry is notoriously difficult to read. Aspiring drivers are often handed 3GB CSV files filled with millions of rows of numbers (pbrake_f, accy_can, VBOX_Lat_Min) and expected to "find the time."

We wanted to bridge the gap between Data and Driver. We realized that spreadsheets don't teach you how to drive—visuals do. We built the GR Cup Racing Academy to turn that intimidating wall of text into an interactive, 3D "Digital Twin" that reveals exactly what the car was doing at every inch of the track.

What it does

The GR Cup Racing Academy is a browser-based 3D visualization tool that ingests raw GR Cup telemetry data and replays the race instantly.

  • Universal Track Generator: It procedurally generates a 3D track layout from any GPS telemetry file. You don't need pre-modeled assets; the code draws the track based on where the car actually drove.
  • The "Ghost Car": A 3D model that accurately mimics the real car's speed, steering angle, and position frame-by-frame.
  • Academy Heatmaps: We built two distinct analysis modes:
    1. Speed Mode: Visualizes velocity (Green = Fast, Red = Slow).
    2. Input Mode (The Coach): Visualizes Driver Intent. It lights up Red for Braking and Green for Throttle, allowing users to instantly spot "coasting" zones where they are losing time.
  • Large File Support: A robust upload engine that handles massive datasets directly in the browser.

How we built it

We built a high-performance frontend stack to handle the data load:

  • Core Stack: React, TypeScript, and Vite for speed.
  • 3D Engine: React Three Fiber (R3F) and Drei to render the visualization at 60FPS.
  • Data Pipeline: We used PapaParse with a custom "Streaming" configuration.
  • Math: We wrote custom algorithms to convert Geodetic coordinates (Latitude/Longitude minutes) into Cartesian 3D space (X/Z meters), normalizing the track to the scene origin.
  • State: Zustand for high-frequency state management (updating the UI every frame without re-renders).

Challenges we ran into

The biggest challenge was The 3 Gigabyte Crash. The telemetry files provided were massive (up to 3.5GB). When we first tried to load them, the browser crashed instantly because FileReader tried to load the entire text string into RAM.

The Solution: We implemented a Chunked Streaming Parser. Instead of reading the whole file, our engine "sips" the file 1MB at a time. We also built a "Preview Limiter" that stops reading after 50,000 frames. This allowed us to visualize high-fidelity data from massive files instantly, with zero lag and no backend required.

Another challenge was Data Normalization. The CSVs used "Long Format" (Key-Value pairs in rows) rather than standard columns, and the GPS was in Minutes, not Degrees. We had to write a robust validator that detects the file format and transforms the coordinate system on the fly.

Accomplishments that we're proud of

  • Zero-Backend Architecture: The entire app runs in the client's browser. No servers, no uploads, total privacy.
  • The "Input Heatmap": Seeing the track light up Red/Green based on the driver's pedals was an "Aha!" moment. It instantly turned abstract numbers into a coaching tool.
  • Performance: Getting 60FPS animation while parsing thousands of data points in real-time.

What we learned

  • Browser Limits: We learned the hard limits of browser memory and how to circumvent them using streams.
  • The Friction Circle: We learned how telemetry sensors (accx and accy) translate to real-world tire physics.
  • GPS Projection: We gained a deep appreciation for the math required to flatten a spherical earth onto a flat 3D plane.

What's next for GR Cup Racing Academy

  • AI Coach: Implementing a scoring algorithm that grades cornering smoothness and braking efficiency (0-100 Score).
  • VR Support: Putting the user inside the Ghost Car using WebXR for a first-person replay experience.
  • Multi-Car Comparison: Loading two CSVs simultaneously to race a "Pro" ghost against an "Amateur" ghost to see exactly where the gap is.

Built With

  • vite
Share this project:

Updates

Submission history