[PR #236] Add tire degradation analysis for the F1 Insights #239

Open
opened 2026-05-07 00:19:21 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/236
Author: @OlavoFava
Created: 2/23/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (3)

  • 7f2755b insights_menu.py: Added a new menu item for tyre degradation insights and linked it to the new window.
  • 5552e8a Merge branch 'IAmTomShaw:main' into main
  • b352f9d This change is trying to fix the issue of the tyre degradation window not updating correctly when the session is restarted. The main changes include:

📊 Changes

8 files changed (+411 additions, -9 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 main.py (+2 -1)
📝 requirements.txt (+2 -1)
📝 src/gui/insights_menu.py (+12 -4)
src/gui/tyre_degradation_window.py (+368 -0)
📝 src/interfaces/race_replay.py (+13 -1)
📝 src/run_session.py (+4 -2)
📝 src/tyre_degradation_integration.py (+9 -0)

📄 Description

Description

I've implemented a complete tyre degradation analysis system for F1 Race Replay, enabling users to visualize the impact of tyre wear throughout the race in a clear and intuitive way.

Changes

Features Added

  • Tyre Degradation Analysis Window: New interactive window accessible via "F1 Insights" menu that displays tyre degradation graphs.

  • Multi-Driver Visualization:

    • Default mode shows all drivers simultaneously with distinct colors
    • Dropdown filter allows individual driver analysis
    • Real-time synchronization with race simulation
  • Tyre Health Calculation (%):

    • Y-axis shows tyre health in percentage (100% = new, 0% = maximum life)
    • Allows negative values when tyres are used beyond expected life
    • Degradation calculated per stint, resetting when tyres are changed
  • X-Axis in Race Laps: Synchronized with race progress, showing cumulative degradation per lap

  • Automatic Stint Reset: Each tyre compound change starts a new stint with recalculated health

Technical Details

  • Data Source: Collects real-time telemetry from all drivers via data stream
  • Optimized Updates: Timer every 100ms to reduce lag while maintaining responsiveness
  • Expected Life per Compound:
    • SOFT: 10 laps
    • MEDIUM: 15 laps
    • HARD: 20 laps
    • INTERMEDIATE: 25 laps
    • WET: 30 laps

Files Modified

  • src/gui/tyre_degradation_window.py - New analysis window with graph logic
  • src/gui/insights_menu.py - F1 Insights menu integration

Files Deleted

  • test_tyre_degradation.py - Non-essential test script removed

Testing

  • Tested with simulated data from multiple drivers
  • Synchronization verified with accelerated replay
  • Degradation reset on tyre changes validated
  • Individual driver filter confirmed

Notes

  • Degradation is calculated linearly based on compound expected life
  • Negative values indicate tyre overuse beyond projected life
  • The window updates continuously while open, even during accelerated replay

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/IAmTomShaw/f1-race-replay/pull/236 **Author:** [@OlavoFava](https://github.com/OlavoFava) **Created:** 2/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`7f2755b`](https://github.com/IAmTomShaw/f1-race-replay/commit/7f2755b17e6442d758d2334d7b5886b3d0992be7) insights_menu.py: Added a new menu item for tyre degradation insights and linked it to the new window. - [`5552e8a`](https://github.com/IAmTomShaw/f1-race-replay/commit/5552e8a06629d8999acb6c9ad7f8c060b44dbcaf) Merge branch 'IAmTomShaw:main' into main - [`b352f9d`](https://github.com/IAmTomShaw/f1-race-replay/commit/b352f9d1fd53d25cb15d69d71ca56d954f5094f8) This change is trying to fix the issue of the tyre degradation window not updating correctly when the session is restarted. The main changes include: ### 📊 Changes **8 files changed** (+411 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `main.py` (+2 -1) 📝 `requirements.txt` (+2 -1) 📝 `src/gui/insights_menu.py` (+12 -4) ➕ `src/gui/tyre_degradation_window.py` (+368 -0) 📝 `src/interfaces/race_replay.py` (+13 -1) 📝 `src/run_session.py` (+4 -2) 📝 `src/tyre_degradation_integration.py` (+9 -0) </details> ### 📄 Description ## Description I've implemented a complete tyre degradation analysis system for F1 Race Replay, enabling users to visualize the impact of tyre wear throughout the race in a clear and intuitive way. ## Changes ### Features Added - **Tyre Degradation Analysis Window**: New interactive window accessible via "F1 Insights" menu that displays tyre degradation graphs. - **Multi-Driver Visualization**: - Default mode shows all drivers simultaneously with distinct colors - Dropdown filter allows individual driver analysis - Real-time synchronization with race simulation - **Tyre Health Calculation (%)**: - Y-axis shows tyre health in percentage (100% = new, 0% = maximum life) - Allows negative values when tyres are used beyond expected life - Degradation calculated per stint, resetting when tyres are changed - **X-Axis in Race Laps**: Synchronized with race progress, showing cumulative degradation per lap - **Automatic Stint Reset**: Each tyre compound change starts a new stint with recalculated health ### Technical Details - **Data Source**: Collects real-time telemetry from all drivers via data stream - **Optimized Updates**: Timer every 100ms to reduce lag while maintaining responsiveness - **Expected Life per Compound**: - SOFT: 10 laps - MEDIUM: 15 laps - HARD: 20 laps - INTERMEDIATE: 25 laps - WET: 30 laps ### Files Modified - `src/gui/tyre_degradation_window.py` - New analysis window with graph logic - `src/gui/insights_menu.py` - F1 Insights menu integration ### Files Deleted - `test_tyre_degradation.py` - Non-essential test script removed ## Testing - ✅ Tested with simulated data from multiple drivers - ✅ Synchronization verified with accelerated replay - ✅ Degradation reset on tyre changes validated - ✅ Individual driver filter confirmed ## Notes - Degradation is calculated linearly based on compound expected life - Negative values indicate tyre overuse beyond projected life - The window updates continuously while open, even during accelerated replay --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/f1-race-replay#239
No description provided.