[PR #211] New telemetry analysis window for races #221

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

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/211
Author: @Vishnu-Cyber-Blip
Created: 2/2/2026
Status: 🔄 Open

Base: mainHead: New-Telemetry-Analysis-Window-for-Races


📝 Commits (10+)

  • b2309bb New leaderboard and whether UI
  • 6407363 Delete ui_components.py from the main folder
  • d6f20e5 Delete race_replay.py
  • 73fc04d New leaderboard and whether UI
  • 48be66f Cleaner Leaderboard and Weather UI
  • 50d589b Conflict debugging
  • 7cec655 New Telemetry analysis window for Races
  • 9e60dc6 Merge branch 'main' into New-Telemetry-Analysis-Window-for-Races
  • 896e9b9 No conflict merge
  • 076a24d UI Update

📊 Changes

43 files changed (+1499 additions, -1846 deletions)

View changed files

icons/flag.png (+0 -0)
icons/humidity.png (+0 -0)
icons/rain.png (+0 -0)
icons/thermometer.png (+0 -0)
icons/wind.png (+0 -0)
📝 main.py (+174 -144)
src/__pycache__/arcade_replay.cpython-310.pyc (+0 -0)
src/__pycache__/arcade_replay.cpython-313.pyc (+0 -0)
src/__pycache__/bayesian_tyre_model.cpython-313.pyc (+0 -0)
src/__pycache__/f1_data.cpython-310.pyc (+0 -0)
src/__pycache__/f1_data.cpython-313.pyc (+0 -0)
src/__pycache__/tyre_degradation_integration.cpython-313.pyc (+0 -0)
src/__pycache__/ui_components.cpython-310.pyc (+0 -0)
src/__pycache__/ui_components.cpython-313.pyc (+0 -0)
📝 src/arcade_replay.py (+7 -1)
📝 src/bayesian_tyre_model.py (+226 -667)
src/cli/__pycache__/race_selection.cpython-310.pyc (+0 -0)
src/cli/__pycache__/race_selection.cpython-313.pyc (+0 -0)
📝 src/f1_data.py (+149 -250)
src/gui/__pycache__/race_selection.cpython-310.pyc (+0 -0)

...and 23 more files

📄 Description

PR Title: Feature: Dual-Window Telemetry Monitor (Process Separation) for Races.

Description

--This PR introduces a Dual-Window Telemetry Monitor, a professional-grade feature allowing users to analyze live telemetry data in a dedicated second window while watching the race replay.
---To solve performance issues associated with rendering multiple windows in a single Python thread (OpenGL context switching conflicts), this implementation uses Process Separation. The Telemetry Monitor runs as a completely independent operating system process, synchronized with the main replay via a local UDP socket connection.

Key Changes

  1. Architecture & Core Logic

--Process Separation: Implemented a Master-Slave architecture. The Main Window ("Master") and Telemetry Window ("Slave") run in separate processes to maximize performance and prevent "Not Responding" freezes.
--Socket Sync (src/lib/sync.py): Added a custom TelemetrySender and TelemetryListener.
--Master: Broadcasts the current frame_index and selected_driver 60 times per second.
--Slave: Listens for packets and instantly updates its graph cursor to match the replay time.

  1. New Interface: Telemetry Window

--New File: src/interfaces/telemetry_window.py
--Visuals: Renders high-contrast Speed, Gear, and Input (Throttle/Brake) graphs matching the app's dark theme.

Logic:

--Uses Time-Based (Frame) Axis instead of Distance to prevent graphs from "flatlining" or disappearing when cars are stationary (pit stops, grid starts).
--Pre-calculated Caching: Telemetry arrays are computed on selection for instant zero-lag rendering.

  1. Main Window Integration (src/interfaces/race_replay.py)

--Broadcasting: Integrated the TelemetrySender into the main game loop (on_update).
--Interaction: Clicking a driver on the Leaderboard now triggers a network message, causing the Telemetry Window to instantly switch to that driver's data.

  1. Launcher Logic (main.py)

--Recursive Spawning: Added logic to detect a --monitor flag.
--If detected, the script uses subprocess.Popen to launch a second instance of itself with the --telemetry-child flag.
--The child process initializes only the Telemetry Window.
--The parent process initializes the standard Race Replay.

  1. GUI Updates (src/gui/race_selection.py)

User Option: Added a checkbox "Enable Telemetry Monitor (Dual Window)" to the session selection panel.
Command Generation: Ticking this box appends the --monitor argument to the launch command.

6.How to Launch:

--Run python main.py.
--Select your desired Year, Round, and Session (e.g., "Race").
--Check the box: "Enable Telemetry Monitor (Dual Window)".
--Click the Session button (e.g., "Race"). Two windows will appear.

ONLY FOR RACES. IT WILL TAKE A MINUTE OR TWO TO LOAD

image image image

🔄 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/211 **Author:** [@Vishnu-Cyber-Blip](https://github.com/Vishnu-Cyber-Blip) **Created:** 2/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `New-Telemetry-Analysis-Window-for-Races` --- ### 📝 Commits (10+) - [`b2309bb`](https://github.com/IAmTomShaw/f1-race-replay/commit/b2309bb5ebd1d6d31b0911f2605e52232f89f2e4) New leaderboard and whether UI - [`6407363`](https://github.com/IAmTomShaw/f1-race-replay/commit/6407363f2a21a871e8da1aadec85d666baeff56f) Delete ui_components.py from the main folder - [`d6f20e5`](https://github.com/IAmTomShaw/f1-race-replay/commit/d6f20e5db12d5555532596ca3f223c336b3d722e) Delete race_replay.py - [`73fc04d`](https://github.com/IAmTomShaw/f1-race-replay/commit/73fc04d111f9720df49d52f72707c56932cea9a2) New leaderboard and whether UI - [`48be66f`](https://github.com/IAmTomShaw/f1-race-replay/commit/48be66fd5bb02eb5a569dd23c486b393a5ce9370) Cleaner Leaderboard and Weather UI - [`50d589b`](https://github.com/IAmTomShaw/f1-race-replay/commit/50d589b23476e90c783c1e0091eec9e004e3bad1) Conflict debugging - [`7cec655`](https://github.com/IAmTomShaw/f1-race-replay/commit/7cec6550531de36e7ba6c3ebd03bec0dae910a52) New Telemetry analysis window for Races - [`9e60dc6`](https://github.com/IAmTomShaw/f1-race-replay/commit/9e60dc62b4345d66d41c0780ea7bea30bd3102e2) Merge branch 'main' into New-Telemetry-Analysis-Window-for-Races - [`896e9b9`](https://github.com/IAmTomShaw/f1-race-replay/commit/896e9b96698ea9397bac23d387149fce66092b15) No conflict merge - [`076a24d`](https://github.com/IAmTomShaw/f1-race-replay/commit/076a24d24b5e0c82351a822693ed26fa17633183) UI Update ### 📊 Changes **43 files changed** (+1499 additions, -1846 deletions) <details> <summary>View changed files</summary> ➕ `icons/flag.png` (+0 -0) ➕ `icons/humidity.png` (+0 -0) ➕ `icons/rain.png` (+0 -0) ➕ `icons/thermometer.png` (+0 -0) ➕ `icons/wind.png` (+0 -0) 📝 `main.py` (+174 -144) ➕ `src/__pycache__/arcade_replay.cpython-310.pyc` (+0 -0) ➕ `src/__pycache__/arcade_replay.cpython-313.pyc` (+0 -0) ➕ `src/__pycache__/bayesian_tyre_model.cpython-313.pyc` (+0 -0) ➕ `src/__pycache__/f1_data.cpython-310.pyc` (+0 -0) ➕ `src/__pycache__/f1_data.cpython-313.pyc` (+0 -0) ➕ `src/__pycache__/tyre_degradation_integration.cpython-313.pyc` (+0 -0) ➕ `src/__pycache__/ui_components.cpython-310.pyc` (+0 -0) ➕ `src/__pycache__/ui_components.cpython-313.pyc` (+0 -0) 📝 `src/arcade_replay.py` (+7 -1) 📝 `src/bayesian_tyre_model.py` (+226 -667) ➕ `src/cli/__pycache__/race_selection.cpython-310.pyc` (+0 -0) ➕ `src/cli/__pycache__/race_selection.cpython-313.pyc` (+0 -0) 📝 `src/f1_data.py` (+149 -250) ➕ `src/gui/__pycache__/race_selection.cpython-310.pyc` (+0 -0) _...and 23 more files_ </details> ### 📄 Description PR Title: Feature: Dual-Window Telemetry Monitor (Process Separation) for Races. Description --This PR introduces a Dual-Window Telemetry Monitor, a professional-grade feature allowing users to analyze live telemetry data in a dedicated second window while watching the race replay. ---To solve performance issues associated with rendering multiple windows in a single Python thread (OpenGL context switching conflicts), this implementation uses Process Separation. The Telemetry Monitor runs as a completely independent operating system process, synchronized with the main replay via a local UDP socket connection. Key Changes 1. Architecture & Core Logic --Process Separation: Implemented a Master-Slave architecture. The Main Window ("Master") and Telemetry Window ("Slave") run in separate processes to maximize performance and prevent "Not Responding" freezes. --Socket Sync (src/lib/sync.py): Added a custom TelemetrySender and TelemetryListener. --Master: Broadcasts the current frame_index and selected_driver 60 times per second. --Slave: Listens for packets and instantly updates its graph cursor to match the replay time. 2. New Interface: Telemetry Window --New File: src/interfaces/telemetry_window.py --Visuals: Renders high-contrast Speed, Gear, and Input (Throttle/Brake) graphs matching the app's dark theme. Logic: --Uses Time-Based (Frame) Axis instead of Distance to prevent graphs from "flatlining" or disappearing when cars are stationary (pit stops, grid starts). --Pre-calculated Caching: Telemetry arrays are computed on selection for instant zero-lag rendering. 3. Main Window Integration (src/interfaces/race_replay.py) --Broadcasting: Integrated the TelemetrySender into the main game loop (on_update). --Interaction: Clicking a driver on the Leaderboard now triggers a network message, causing the Telemetry Window to instantly switch to that driver's data. 4. Launcher Logic (main.py) --Recursive Spawning: Added logic to detect a --monitor flag. --If detected, the script uses subprocess.Popen to launch a second instance of itself with the --telemetry-child flag. --The child process initializes only the Telemetry Window. --The parent process initializes the standard Race Replay. 5. GUI Updates (src/gui/race_selection.py) User Option: Added a checkbox "Enable Telemetry Monitor (Dual Window)" to the session selection panel. Command Generation: Ticking this box appends the --monitor argument to the launch command. 6.How to Launch: --Run python main.py. --Select your desired Year, Round, and Session (e.g., "Race"). --Check the box: "Enable Telemetry Monitor (Dual Window)". --Click the Session button (e.g., "Race"). Two windows will appear. **ONLY FOR RACES. IT WILL TAKE A MINUTE OR TWO TO LOAD** <img width="997" height="727" alt="image" src="https://github.com/user-attachments/assets/0c582c62-d1dc-4447-97e8-075f4f4c0f2c" /> <img width="1919" height="1033" alt="image" src="https://github.com/user-attachments/assets/777033a0-4fa0-4ba7-b840-c95441033373" /> <img width="1919" height="1032" alt="image" src="https://github.com/user-attachments/assets/295aa690-6408-4c7b-aead-3c61d984216a" /> --- <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#221
No description provided.