Skip to content

A helper CLI for broadcasting and recording F1 game data

License

Notifications You must be signed in to change notification settings

racing-telemetry/f1-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1 CLI

A helper CLI for broadcasting and recording F1 game data

Apache 2.0 Go Report Build Status GitHub release Go Mod

Table of Contents

Introduction

We made this tool thinking that we could take the F1 game data from UDP and simulate that race or laps again using this data.

Installation

Go

If you have Go 1.17+, you can directly install by running:

$ go install github.com/racing-telemetry/f1-dump@latest

and the resulting binary will be placed at $HOME/go/bin/f1.

Homebrew

If you have brew installed, then you can easily download this with the following commands:

brew tap racing-telemetry/homebrew-tap
brew install f1-cli

Quick Start

$ f1 --help
A helper CLI for broadcasting and recording F1 game data

Usage:
  f1 [command]

Available Commands:
  broadcast   Start broadcasting
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  list        List F1 packet types
  record      Start recording packets from UDP source
  version     Prints the CLI version

Flags:
  -h, --help      help for f1
  -v, --verbose   verbose output

Use "f1 [command] --help" for more information about a command.

Recording

You can record the packets from the F1 game with UDP socket.

# Default options
$ f1 record

# Specify the output file name
$ f1 record -f f1-cli-out.bin

# Different IP and Port
$ f1 record --ip 192.168.1.41 -p 20777

# Ignore Packets
$ f1 record --ignore 1,2,3,4,5,6

Broadcasting

You can broadcast the data you have recorded with using UDP.

# Recorded binary file
$ f1 broadcast -f f1-cli-out.bin

# Ignore Packets
$ f1 broadcast -f f1-cli-out.bin --ignore 1,2,3,4,5,6

# Broadcast all files instantly
$ f1 broadcast -f f1-cli-out.bin -i

# Different IP and Port
$ f1 broadcast -f f1-cli-out.bin --ip 192.168.1.41 -p 20777