mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-10 00:08:35 +02:00
[PR #132] fix(ui): Implement Dynamic Velocity-Based Time Gap Calculation #163
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#163
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/132
Author: @shash-hq
Created: 12/27/2025
Status: 🔄 Open
Base:
main← Head:fix/time-gaps📝 Commits (2)
aaadd31Fix: Implemented dynamic time gap calculation based on telemetry speedb80ff53Fix(ui): Add missing Time Gap rendering to Leaderboard📊 Changes
1 file changed (+39 additions, -15 deletions)
View changed files
📝
src/ui_components.py(+39 -15)📄 Description
Analysis of Issue
The
DriverInfoComponentinsrc/ui_components.pycalculated time gaps using a static constant velocity model (REFERENCE_SPEED_MS = 55.56or ~200 km/h). This resulted in substantial deviations from reality during non-standard race phases (e.g., Safety Car, cornering, pit maneuvers).Implementation Details
calculate_gapfunction to accept instantaneous velocity inputs.ΔDistance / Velocity_Self.ΔDistance / Velocity_Opponent.10.0 m/s) to prevent division-by-zero errors or asymptotic time values during low-speed intervals.Verification
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.