Comments (10)
I had to do some research to figure out what the correct behaviour here should be.
Quoting from the current sporting regulations:
57.4 Whilst the sprint session or the race is suspended:
a) The sprint session, the race nor the timekeeping system will stop [...]
This would indicate that the timing just keeps going. Therefore, the lap time for lap 35 should include the duration of the pause, given that the timing beam is at the entry of the pit lane. Similarly, the lap time for lap 36 should include the time that the car is stationary on the grid.
This is backed up by the lap time analysis that the FIA makes available. Here is lap 34 to 36 for Verstappen:
From this, it seems that the only issue in FastF1 is that the first five drivers have a NaT lap time. But the rest is correct, right?
What exactly do you mean with
I am unable to filter the lap by TrackStatus, PitInTime, or PitOutTime
Did you want to remove or select the restart lap?
from fast-f1.
I want to remove the restart lap because I want to calculate the average pace of each driver excluding VSC, SC, Red flags, PitIn laps, PitOut laps. I think the TrackStatus in a restartlap should not be 1 (green flag) otherwise i do not know other way to remove the restart lap
from fast-f1.
You can just remove the restart lap by its lap number.
Something like :
racing_laps = laps[laps['LapNumber'] != 36]
(disclaimer: untested code)
This is just normal pandas dataframe indexing to select all laps where the LapNumber is not 36.
from fast-f1.
I think the TrackStatus in a restartlap should not be 1 (green flag)
If the green flag is shown before the drivers cross the timing line (I'm going to check that this was actually the case) then the entirety of the 36th lap was under green flag conditions. Even though the restart procedure is included in that lap.
I'm going to adhere to the procedure and meaning as described in the sporting regulations here. I am not going to redefine what the meaning of a green flag is.
from fast-f1.
You can just remove the restart lap by its lap number
Yes, but I am trying to do a code that works in any race, so the deleted lap should not be a constant
If the green flag is shown before the drivers cross the timing line
Yes, it was the case
I am not going to redefine what the meaning of a green flag is.
I agree. I have reviewed the documentation and '1' indicates 'Track Clear' instead of 'Green Flag', maybe a new value can be added to indicate standing start in that lap, for example: ‘8’: Standing Start and the Track Status of the lap 36 should have been '81' or '18' or '181'
Here I show the documentation about Track Status changes:
‘1’: Track clear (beginning of session ot to indicate the end of another status)
‘2’: Yellow flag (sectors are unknown)
‘3’: ??? Never seen so far, does not exist?
‘4’: Safety Car
‘5’: Red Flag
‘6’: Virtual Safety Car deployed
‘7’: Virtual Safety Car ending (As indicated on the drivers steering wheel, on tv and so on; status ‘1’ will mark the actual end)
Thanks!
from fast-f1.
I have reviewed the documentation and '1' indicates 'Track Clear' instead of 'Green Flag'
In fact, green flag indicates "track clear". So these two are equivalent.
The restart procedure just takes place under green flag conditions.
maybe a new value can be added to indicate standing start in that lap, for example: ‘8’
No, because the restart procedure is not a track status. So this is technically incorrect. We would need to use a different way to indicate the restart.
I understand that the data in its current form is not the most practical for you. But you will need to use a different approach for now. Either manually removing the lap. Or removing every lap after a red flag or something like that.
from fast-f1.
Hi again,
I have reviewed the data and determined how the information is obtained from it. I found that the "RaceControlMessages.jsonStream" contains information about whether the restart is a "standing start" or a "rolling start" after a red flag. Since I am only interested in removing the "standing start," I can search for it in the race control messages and remove lap+1 when the "standing start" is reported.
Upon checking the documentation, I noticed that "fastf1.core.Session.race_control_messages" does not include the lap of the messages. Do you think it is possible to add the lap information to the messages in future versions? This information is written in https://livetiming.formula1.com/static/2023/2023-10-29_Mexico_City_Grand_Prix/2023-10-29_Race/RaceControlMessages.json
import fastf1
term = fastf1.get_session(2023,'Mexico','R')
term.load(laps=True, telemetry=True, weather=False, messages=True, livedata=None)
messages_info=term.race_control_messages
print(messages_info)
Thanks!
from fast-f1.
Hi, i have just created the pull request #475 to add a new column called 'Lap' that contains the Lap information written in RaceControlMessages.jsonStream.
I have tested it and it works, but it is my first pull request in github. I am not sure if I have done everything correctly
Thanks
from fast-f1.
In lap 36, the LapTime is recorded as NaT for the first 5 drivers in that lap (VER, HAM, LEC, SAI, RIC), while the other drivers have LapTimes around 2 minutes and 20 seconds.
I've investigated this part now as well. The "problem" is that lap times >=2:30.000 are intentionally ignored in the api parser to filter out some incorrect data. I guess that limit is chosen somewhat unfortunate here. Fixing this correctly (not just increasing the limit slightly) might be a bit more complicated but I'll try to look into that soon.
from fast-f1.
Related Issues (20)
- [BUG] get_circuit_info() doesn't work with custom TELEMETRY_FREQUENCY HOT 6
- [BUG] Example ``plot_driver_laptimes.py`` no longer working with latest Seaborn release HOT 11
- [BUG] Data for Piastri in the sprint shootout not available HOT 2
- [BUG] The first lap of a race should not have a PitOutTime HOT 3
- [BUG] Incorrect Qatar Sprint results due to not applied penalties HOT 3
- [BUG] All laps from Singapore and Qatar Grand Prix have IsAccurate=False HOT 3
- [ENH] Add Python 3.12 to test HOT 1
- [BUG] USGP Results | Duplicate entry for TSU and LEC missing data HOT 4
- [BUG] Laps.pick_fastest(only_by_time=True) inconsistency HOT 5
- Ergast ShuttingDown HOT 1
- [DEPR] ``pick_fastest`` needs to return ``None`` instead of empty ``Lap`` HOT 1
- Rainfall Data wrong in Weather Data for some GPs HOT 2
- install pyproject.toml-based projects HOT 10
- [ENH] Drivers colors HOT 7
- [BUG] Las Vegas FP1, FP3 and Race failing to load HOT 4
- [BUG] Incorrect data Las Vegas Race HOT 3
- [ENH] Telemetry DataFrame should include DriverId HOT 9
- Lap to grid + formation lap part of the data for Sprint Shootout and Race sessions HOT 2
- [BUG] Driver CountryCode is not populated in the SessionResults object HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-f1.