Inspiration
As amateur racers competing in the Toyota GR Cup, we faced a common challenge: understanding where we were losing time on track. Professional race teams have dedicated data engineers analyzing telemetry, but grassroots racers are left staring at spreadsheets of numbers with little actionable insight. We built GR-Lap-Coach to democratize racing data analysis by combining the precision of telemetry with the accessibility of AI coaching—giving every driver their own virtual race engineer.
What it does
GR-Lap-Coach transforms raw racing telemetry into actionable coaching insights. Upload your CSV data from a track session, and the app:
Synthesizes a "Perfect Lap" by identifying the fastest sectors across all your laps and combining them into a theoretical best time Filters out drafting effects automatically by detecting unusually high corner speeds (>162 km/h) Visualizes your performance with interactive speed vs. distance charts Provides AI-powered coaching through an interactive chat interface where you can ask specific questions about braking points, corner speeds, and where to find time Persists your sessions so you can track progress over time and review past analyses Think of it as having a race engineer in your pocket who's analyzed every meter of your laps and can answer questions like "Where can I find the most time?" or "How's my braking into Turn 1?"
How we built it
We built GR-Lap-Coach as a full-stack web application using:
Next.js 14 with TypeScript for the frontend and API routes Supabase (PostgreSQL) for persistent storage of telemetry sessions and chat history OpenAI GPT-4o for natural language coaching insights PapaParse for robust CSV telemetry parsing Recharts for interactive data visualization Tailwind CSS with a custom racing-themed dark UI The core challenge was building a telemetry engine that could work around broken lap counters in the ECU data. We detect lap boundaries by monitoring distance rollover patterns, segment each lap into sectors (customized for Circuit of the Americas), and apply intelligent filtering to remove laps affected by drafting. The AI coach is given full context of the telemetry data and sector analysis to provide specific, data-driven recommendations
Challenges we ran into
Broken lap counter in ECU data: The lap trigger in our telemetry files was unreliable, forcing us to implement custom lap detection by analyzing distance patterns (drops from >3000m to <200m) Drafting contamination: Initial "perfect lap" synthesis was skewed by laps where drivers benefited from drafting. We had to implement speed threshold filtering for specific track sectors CSV format validation: Real-world telemetry files had inconsistent formatting, requiring robust error handling and user-friendly validation messages Context length for AI: Balancing how much telemetry detail to feed the AI model while staying within token limits—we settled on sector summaries with statistical breakdowns Session state management: Ensuring chat conversations maintained context across page refreshes while keeping the database schema efficient
Accomplishments that we're proud of
Built a production-ready telemetry analysis tool in a short timeframe that we actually use at the track Created an AI coaching interface that provides genuinely useful, specific feedback rather than generic advice Designed an intuitive three-tab workflow (Upload → Analysis → Coach) that makes complex data accessible Implemented intelligent data filtering that improves analysis quality automatically Achieved sub-second analysis times for full track sessions with multiple laps Built a system that works around real-world data quality issues that plague grassroots racing
What we learned
Domain expertise matters: Understanding the nuances of racing (drafting effects, sector definitions, track-specific challenges) was crucial to building useful features AI needs good prompts: The quality of coaching improved dramatically when we structured the prompt to include not just raw numbers but context about what makes a good lap Real data is messy: Production CSV files from race cars don't follow perfect formats—robust parsing and validation is essential Visualization aids understanding: Seeing the speed trace visually helped us catch edge cases in our lap detection algorithm Persistence adds value: Storing sessions opened up future possibilities for historical comparison and progress tracking
What's next for GR-Lap-Coach
Multi-track support: Make sector definitions configurable for different race circuits beyond COTA Session browser: Let users review and compare past track sessions Comparative analysis: Compare your sectors against other drivers or your own historical best Advanced filtering: Account for tire degradation, fuel load, and track temperature Video sync: Overlay telemetry data on in-car video for visual coaching Lap progression tracking: Visualize improvement throughout a session as tires warm up and you learn the track Export and sharing: Generate PDF reports and share sessions with coaches Real-time mode: Support live telemetry streaming during track sessions
Built With
- nextjs
- openai
- superbase
- typescript
Log in or sign up for Devpost to join the conversation.