joshjaysalazar / iRacingSafetyCarGenerator

Software to generate custom safety cars during an iRacing race
GNU General Public License v3.0
1 stars 1 forks source link

Wave arounds should be automatic #6

Closed joshjaysalazar closed 4 months ago

joshjaysalazar commented 4 months ago

Is your feature request related to a problem? Please describe. As of right now, because of the way automatic wave arounds work in iRacing, there's very little chance a wave around happens in a road race, as the pack is all bunched up by the time 1 to green is shown.

Describe the solution you'd like The system should take stock of where everyone is in lap count and position on track, and send !wave commands for each car that's a lap down or worse right after the yellow is thrown. This should be easy to figure out: any car which has started 1 fewer laps than the leader and is behind the leader on track, or any car which has started 2 or fewer laps than the leader, is lapped and therefore should be waved around. This assumes that the user has selected the automatic wave arounds option in the UI before starting the program (which needs to be added, of course). Different classes need to be considered here too, so if it's a multiclass race, calculations need to be done from the leader of each class.

Describe alternatives you've considered It could also be done at the line after the !pacelaps command is thrown, but that may not leave enough time for cars to get around if it's immediately 1 to green.

Additional context N/A