Skip to content
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

API Laps method, first lap lap_duration null #30

Closed
gtoniutti opened this issue Mar 16, 2024 · 2 comments
Closed

API Laps method, first lap lap_duration null #30

gtoniutti opened this issue Mar 16, 2024 · 2 comments

Comments

@gtoniutti
Copy link

Hello,
I am trying to calculate the duration of one GP for each driver through the API Laps method summing up the "lap_duration" for each lap. However, I noticed that the "lap_duration" (and also the "duration_sector_1") is always null. Is this a bug? How can I reach the scope otherwise?
Here below an example:
{"meeting_key":1230,"session_key":9480,"driver_number":16,"i1_speed":280,"i2_speed":293,"st_speed":307,"date_start":null,"lap_duration":null,"is_pit_out_lap":false,"duration_sector_1":null,"duration_sector_2":29.838,"duration_sector_3":29.664,"segments_sector_1":[2048,2049,2049,2049,2051,2049,2051,2049,2049],"segments_sector_2":[2049,2049,2049,2049,2049,2049,2049],"segments_sector_3":[2051,2048,2048,2049,2048,2048,2048,2048,2049],"lap_number":1}

Many thanks in advance for any help.

@br-g
Copy link
Owner

br-g commented Mar 16, 2024

Hello,

The absence of lap times for the first lap of each race is by design. This occurs because races typically begin from a position already within the first lap, past the starting line. Consequently, attempting to calculate the duration for this initial lap would not yield meaningful results.

Moving forward, it's possible to consider the first lap's duration as the time elapsed from the race's start until the first crossing of the starting line. However, determining the precise start time of the race remains a challenge, as I currently lack this information in the available data.

@br-g br-g closed this as completed Mar 16, 2024
@gtoniutti
Copy link
Author

Thank you very much! Please provide updates once it will be possible through Open F1 to calculate the official time (e.g. Verstappen GP of Saudi Arabia 1:20:43.273). Again many thanks

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

No branches or pull requests

2 participants