Skip to content

bobbythehuman/F1-Game-Telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1-Game-Telemetry

Receives telemetry data from the F1 game franchise

Documentation

Data output documentations can be found in the Data Output Doc folder.
It contains the UDP specifications for the following games:

  • F1 25 v3

F1 25 UDP Specification Forum

  • F1 24 v27.2

F1 24 UDP Specification Forum

  • F1 23 v29.3

F1 23 UDP Specification Forum

  • F1 22 v16

F1 21 UDP Specification Forum, has broken download file

  • F1 21 Not available

F1 21 UDP Specification Forum, has broken download file

  • F1 20 v?

F1 20 UDP Specification Forum

  • F1 19 v?

F1 19 UDP Specification Forum

Latest Version

The latest version can be found in code 2024

Main

Inside main.py use the following code to retrieve telemetry data:

from f1_telemetry.server import get_telemetry
for packet, packetID, m_header in get_telemetry():
     # Your code here
    print(packetID, packet)

Data Storage

If you wish to store the telemetry data you can use the lastestData class, making sure to update the class with each packet received:

for packet, packetID, m_header in get_telemetry():
    latestPackets.update(packetID, packet)
    # Your code here

Event Logging

If you wish to log events that occur during a session you can use the eventLogger class.
make sure to update the class with each event packet received:

for packet, packetID, m_header in get_telemetry():
    dataLogger.LogData(packetID, latestPackets)

This class will print out to the console any events that occur during a session.
Most event are print as [{Event Name}] - {message} examples include:

  • [SSTA] - Session has started
  • [FTLP] - User [ID:15-PEREZ-Red Bull Racing-Mexican-11] set fastest lap with [70.744]
  • [OVTK] - User [ID:16-GASLY-Alpine-French-10] has overtaken [ID:13-RUSSELL-Mercedes-British-63]
  • [DTSV] - User [ID:19-VERSTAPPEN-Red Bull Racing-Dutch-33] is serving a drive through penalty
  • [COLL] - Collision between user [ID:15-PEREZ-Red Bull Racing-Mexican-11] and user [ID:17-ALONSO-Aston Martin-Spanish-14]
  • [RCWN] - User [ID:1-LECLERC-Ferrari-Monegasque-16] has won the race

It will also create an event log file containing the above events as well as sessions settings, see code 2024/raceLog.csv for an example log file. This is created during each event (qualy and race).
At the end of the session it will create a race results file, see code 2024/raceResults.csv for an example results file.

About

Receives telemetry data from the F1 game franchise

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages