Skip to content

AuwraCode/LeMansHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🏎️ LMU Race Strategist (V6.0)

Precision Endurance Engineering Tool for Le Mans Ultimate. Built with Python, Streamlit, and Altair.

πŸ“‹ Overview

LMU Race Strategist is a high-fidelity race engineering dashboard designed for sim-racers competing in Le Mans Ultimate. Unlike simple fuel calculators, this tool acts as a Strategy Simulator. It accounts for complex variables such as pit lane loss, tire degradation vs. pit time saved, and safety car buffers.

Designed with a "Dark & Gold" minimalist aesthetic, it reduces cognitive load, allowing drivers to make split-second decisions during endurance stints.

πŸš€ Key Features

1. The Full Grid Database

  • Hypercars (LMH/LMDh): Toyota, Ferrari 499P, Porsche 963, Peugeot 9X8, Cadillac, etc.
  • LMGT3: Lexus RC F, Corvette Z06, BMW M4, Ford Mustang, etc.
  • LMP2: Oreca 07 Gibson.
  • Includes smart baseline fuel consumption data for all chassis.

2. Precision Algorithms

  • Iterative Race Solver: For time-limited races (e.g., 60 mins), the app runs a simulation loop to subtract "Pit Loss Time" from "Race Time" to calculate the exact achievable lap count.
  • Dynamic Driving Styles: Switch between Quali, Full Push, Balanced, and Lift & Coast to see how pace affects strategy.
  • "Splash & Dash" Logic: Automatically detects if the final stint requires a full tank or just a quick splash to cross the line.

3. Tire Strategy Engine πŸ›ž

  • Double Stint Calculator: Mathematically compares time saved in pits (skipping tire change) vs. pace lost on track (worn tires).
  • Verdict System: Gives a clear "βœ… DOUBLE STINT" or "❌ CHANGE TIRES" recommendation based on user input.

4. Visual Telemetry πŸ“‰

  • Fuel Burn Chart: Interactive "Sawtooth" graph (powered by Altair) visualizing fuel levels over the entire race distance.
  • Mission Planner: A generate-able table with specific instructions for the Pit Crew (e.g., "BOX Lap 24, Add 45L").

πŸ› οΈ Technology Stack

  • Core Logic: Python 3.10+
  • UI/Frontend: Streamlit
  • Data Processing: Pandas
  • Visualization: Altair

πŸ“¦ Installation & Usage

  1. Clone the repository:

    git clone [https://github.com/your-username/lmu-strategist.git](https://github.com/your-username/lmu-strategist.git)
    cd lmu-strategist
  2. Install requirements:

    pip install streamlit pandas altair
  3. Launch the Dashboard:

    streamlit run app.py

🧠 Engineering Logic Explained

The Iterative Solver

Most calculators fail at time-limited races because they assume you drive for the full 60 minutes.

  • The Problem: If you pit once (losing 45s), you only drive for 59m 15s.
  • Our Solution: The app runs a for loop. It estimates laps, calculates pit stops, subtracts pit time, re-estimates laps, and repeats until the number converges. This prevents over-fueling.

Tire Decision Matrix

The app uses the following inequality to determine strategy: $$ \text{Time}_{\text{Saved in Pits}} > (\text{Stint Laps} \times \text{Degradation per Lap}) $$ If true, the app recommends double-stinting the tires.

🎨 Design Philosophy

  • High Contrast: Light text on dark background (#0b0d12) for readability in low-light sim rigs.
  • Gold Accents: Highlights critical data points (Stint Length, Fuel to Add).
  • No Clutter: Removal of unnecessary elements to focus on "Mission Critical" data.

πŸ—ΊοΈ Roadmap

  • V1: Basic Calculator
  • V3: Full Car Database & Styles
  • V5: Precision Pit Loss Logic
  • V6: Visual Graphs & Tire Strategy
  • V7: Save/Load User Telemetry (Persistence)
  • V8: Weather Impact Implementation
  • V9: Fully Ai driven app

πŸ“„ License

MIT License. Created for the Sim-Racing Community.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages