mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[PR #211] New telemetry analysis window for races #221
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
main← Head:New-Telemetry-Analysis-Window-for-Races📝 Commits (10+)
b2309bbNew leaderboard and whether UI6407363Delete ui_components.py from the main folderd6f20e5Delete race_replay.py73fc04dNew leaderboard and whether UI48be66fCleaner Leaderboard and Weather UI50d589bConflict debugging7cec655New Telemetry analysis window for Races9e60dc6Merge branch 'main' into New-Telemetry-Analysis-Window-for-Races896e9b9No conflict merge076a24dUI 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
--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.
--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.
--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.
--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.
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.