-
-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pick_inlaps() and pick_outlaps() functions (from #453) #454
Conversation
It's actually unexpected that we have laps with both a pit-in and a pit-out timestamp. Top 3 tracks where this happen in the 2023 season;
I checked the track map at each one and the pit lane start and end are all on different sides of the start/finish line. One explanation is that the car pitted on two consecutive laps but that is a rather rare occurrence that doesn't explain the frequency. Any other obvious reasons that I am overlooking? |
I think this mainly happens in Free Practice or Quali. In quali, a driver could be starting a lap but then aborts, so it re-enters the pit lane in the out lap. Not super common, but it happens sometimes Edit: to answer your question, the first lap in a race always is an out lap. So for example, in the Dutch GP many drivers pitted at the end of lap 1, which becomes both an in lap and out lap. |
I forgot the first lap is always an out lap quirk. That could explain why the tracks where this happens change from year to year. FWIW I only looked at laps from the actual races |
I manually looked at some of the laps that are both an inlap and an outlap in a race. Apart from the first lap, this seems to always happen around safety cars, red flags and changing weather conditions and seems reasonable. For the first lap, actually, I think that it should have no PitOutTime except when a car starts from the pit lane. But that's a separate problem. I wouldn't try to handle the first lap separately in this new function. I think PitOutTimes should be removed from the first lap instead. The PR looks good. If you agree that first lap should have no PitOutTime, then I'll merge this. |
Yeah, I agree with you. Like you said, it would make sense to only have PitOutTime for a first lap if a car starts from the pit lane. But this is possibly a more complex fix, we should maybe open a new issue for that and gather ideas? |
I opened #461 to keep a reminder that the PitOutTime for first laps in a race should not exist |
No description provided.