Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchTracking Namespace Reference

Functions

std::size_t cellOf (float x, float y)
 
std::size_t bucketOf (float minute, int period)
 

Variables

constexpr std::size_t GRID_COLUMNS = 12
 
constexpr std::size_t GRID_ROWS = 9
 
constexpr std::size_t CELLS = GRID_COLUMNS * GRID_ROWS
 
constexpr int BUCKET_MINUTES = 5
 
constexpr std::size_t BUCKETS = 24
 
constexpr std::size_t MAX_PLAYERS = 40
 
constexpr float PROGRESSIVE_METRES = 10.0f
 
constexpr float PROGRESSIVE_MIN_END_X = 0.4f
 
constexpr float PRESSURE_RADIUS_METRES = 4.0f
 

Detailed Description

Grid and thresholds of the per-match tracking. Positions are stored in each side's attacking frame: x runs from the own goal line (0) to the opponent's (1) and y = 0 is the attacking side's left touchline, the frame ShotRecord uses.

Function Documentation

◆ bucketOf()

std::size_t MatchTracking::bucketOf ( float  minute,
int  period 
)

Momentum bucket of a clock minute in a period (added time stays in the period's last bucket).

◆ cellOf()

std::size_t MatchTracking::cellOf ( float  x,
float  y 
)

Cell of a position in the attacking frame.

Variable Documentation

◆ BUCKET_MINUTES

constexpr int MatchTracking::BUCKET_MINUTES = 5
inlineconstexpr

Momentum buckets: five clock minutes each, up to 120 minutes.

◆ BUCKETS

constexpr std::size_t MatchTracking::BUCKETS = 24
inlineconstexpr

◆ CELLS

constexpr std::size_t MatchTracking::CELLS = GRID_COLUMNS * GRID_ROWS
inlineconstexpr

◆ GRID_COLUMNS

constexpr std::size_t MatchTracking::GRID_COLUMNS = 12
inlineconstexpr

Columns along the pitch (thirds are 4 columns each).

◆ GRID_ROWS

constexpr std::size_t MatchTracking::GRID_ROWS = 9
inlineconstexpr

Rows across the pitch (flanks are 3 rows each).

◆ MAX_PLAYERS

constexpr std::size_t MatchTracking::MAX_PLAYERS = 40
inlineconstexpr

Stats entries tracked (starters, substitutes and replacements).

◆ PRESSURE_RADIUS_METRES

constexpr float MatchTracking::PRESSURE_RADIUS_METRES = 4.0f
inlineconstexpr

The closest pressing player within this distance of the carrier applies a pressure (counted once per player and possession spell).

◆ PROGRESSIVE_METRES

constexpr float MatchTracking::PROGRESSIVE_METRES = 10.0f
inlineconstexpr

A completed open-play pass that gains this much ground towards the opponent goal, ending outside the passer's own defensive 40%, is progressive.

◆ PROGRESSIVE_MIN_END_X

constexpr float MatchTracking::PROGRESSIVE_MIN_END_X = 0.4f
inlineconstexpr