Skip to content

Feature: Added Real-Time DSA Engine (Quad Trees), Dynamic Buffer Zones, and Live Tracking#304

Open
ijlal19-pk wants to merge 2 commits into
IAmTomShaw:mainfrom
ijlal19-pk:main
Open

Feature: Added Real-Time DSA Engine (Quad Trees), Dynamic Buffer Zones, and Live Tracking#304
ijlal19-pk wants to merge 2 commits into
IAmTomShaw:mainfrom
ijlal19-pk:main

Conversation

@ijlal19-pk

Copy link
Copy Markdown

Hello @IAmTomShaw!

I loved your f1-race-replay project and wanted to contribute by overhauling the spatial calculations and expanding the visual telemetry interface. Instead of iterating through all drivers to find battles (an O(N^2) operation), I implemented a full Data Structures & Algorithms (DSA) engine to handle spatial queries in real-time.

What's New in this PR:

  1. Quad-Tree Spatial Tracking: Added dsa_engine.py with a custom Quad Tree algorithm. It dynamically partitions the track geometry, allowing lightning-fast spatial queries to detect driver proximity and battling zones.
  2. Buffer Zones & DRS Trains: Implemented Disjoint Set Union (DSU) and Interval Trees to calculate buffer zones. If drivers are within striking distance, the engine now draws striking, real-time telemetry lines connecting the cars to visually represent the gap and the battle for position.
  3. Interactive Driver Tracking: You can now click on any driver on the live leaderboard to lock onto them. A green tracking circle will instantly lock onto their car, following their exact coordinates on the track geometry in real-time!
  4. Modern Web UI Integration: Upgraded the presentation layer by integrating the Eel framework with a responsive React/Vite frontend.
  5. Project Cleanup: Added a robust .gitignore to prevent uploading massive fastf1 telemetry caches and Node modules.

I've made sure to keep the core telemetry processing intact while heavily upgrading the algorithm efficiency and presentation layer. Let me know if you'd like me to tweak anything or if you have any questions about the new DSA architecture!

Best,
Ijlal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant