f1_undercut_window
Estimate whether an F1 attacker can undercut a target driver on the current lap, returning viability, marginal status, and laps needed to clear.
Instructions
Estimate whether an undercut is viable for the attacker against the target.
Args: session_key: OpenF1 session identifier. attacker_number: Attacking driver's race number. target_number: Target driver's race number. current_lap: Current lap number in the race.
Returns: data: {laps_to_clear, viable, marginal}. meta.gap_to_target_s: attacker-minus-target race time at current_lap. meta.gap_source: "cumulative_lap_time", or "default" (assumed 2.0 s, also in meta.assumed_gap_s) when either driver lacks a full lap history. meta.estimated: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| current_lap | Yes | Current lap number in the race. | |
| session_key | Yes | OpenF1 session identifier. | |
| target_number | Yes | Target driver's race number. | |
| attacker_number | Yes | Attacking driver's race number. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| error | No |