Skip to content

FIX: correct timestamps of bunched up tyre data#893

Merged
theOehrly merged 4 commits into
mainfrom
fix-863
Apr 16, 2026
Merged

FIX: correct timestamps of bunched up tyre data#893
theOehrly merged 4 commits into
mainfrom
fix-863

Conversation

@theOehrly
Copy link
Copy Markdown
Owner

@theOehrly theOehrly commented Mar 29, 2026

PR summary

Detects when tyre data was delayed at the start of a session and all bunched up messages then have the same timestamp. In those cases, the timestamps are corrected so that they line up with their corresponding stints. This fixes issues with missing tyre data in some sessions.

Closes #863

ToDo

AI Disclosure

No AI tools used

@theOehrly
Copy link
Copy Markdown
Owner Author

Comparison looks good for the 2018 Azerbaijan Race

Comparison vs Pirelli image image

@theOehrly theOehrly marked this pull request as ready for review April 13, 2026 18:40
@theOehrly theOehrly requested a review from Copilot April 13, 2026 18:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes incorrect tyre stint/compound assignment in sessions where timing-app tyre messages are delayed at session start and arrive “bunched up” with identical timestamps, by introducing timestamp re-alignment logic and adding a regression test for the 2018 Azerbaijan GP case.

Changes:

  • Adjusts how stint boundary timestamps are derived and passed into the tyre-info correction routine.
  • Adds new logic to detect “bunched up” tyre messages at session start and rewrite their timestamps to align with stint brackets.
  • Adds an integration-style test to ensure compounds are correctly assigned for a known affected session (GH#863).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
fastf1/core.py Updates stint split handling and adds session-start “bunched tyre data” timestamp correction within tyre-info fixing logic.
fastf1/tests/test_input_data_handling.py Adds a regression test verifying compounds for ALO in 2018 Azerbaijan race are not missing a stint due to delayed tyre data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fastf1/core.py
Comment thread fastf1/core.py
Comment thread fastf1/core.py Outdated
Comment thread fastf1/core.py Outdated
Comment thread fastf1/tests/test_input_data_handling.py Outdated
@theOehrly theOehrly merged commit e4b795a into main Apr 16, 2026
13 of 16 checks passed
@theOehrly theOehrly deleted the fix-863 branch April 28, 2026 20:34
theOehrly added a commit that referenced this pull request Apr 29, 2026
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.

[BUG] Delayed tyre data in API responses cause dropped stints

2 participants