SimHub icon indicating copy to clipboard operation
SimHub copied to clipboard

DriverAhead_00_Gap don't show same values as in game hud in ACC

Open jakoleh opened this issue 3 years ago • 3 comments

Describe the bug PersistantTrackerPlugin.DriverAhead_00_Gap (and also other gap counters) are giving incorrect values in ACC race. It seems that value is increasing when driving fast and getting smaller in slow speed.

Simhub version 8.1.0

To Reproduce Steps to reproduce the behavior:

  1. Add leaderboard overlay
  2. Start a new race
  3. Compare the times in that overlay to acc own gap display

Expected behavior Gap values should be around the same value +-1 second or so anyway.

Screenshots image

Log files Join log files available in C:\Program Files (x86)\SimHub\Logs

Additional context Add any other context about the problem here.

jakoleh avatar Sep 08 '22 16:09 jakoleh

Hi !

Unfortunately the game does not give that data. The computation, formulas are not available so Simhub uses a generic computation mode which can differ indeed from the game computations.

Nicolas

SHWotever avatar Sep 10 '22 12:09 SHWotever

RaceLabApps is doing it somehow. Their estimation is much closer to SimHubs. SimHub calculation can be 5s off in one lap.

jakoleh avatar Sep 10 '22 13:09 jakoleh

Without knowing, how the calculation is currently done, would it be possible to save timestamp of each car in certain position in track and then compare that timestamp to my timestamp at that point?

jakoleh avatar Sep 11 '22 20:09 jakoleh

Hi ! I reworked it using the F1 like method (kind of "micro-sectoring") like you suggested for the next version : grabbing regular position and timing and comparing it to the the leader time.

That said my observations leads to the fact that there is more than one answer when you consider the various games, you can consider the gap in many ways :

  • 1 Gap to leader (it's the most universal) (F1 like Gap)
  • 2 Gap between two players (as the time difference to cross the same place) with no consideration of the leader (Iracing relative box ?)
  • 3 Gap between two players (as the delta to leader difference) (F1 like "Interval")
  • 4 Gap between two players on track (with no consideration of the leader and the current lap)
  • 4 Gap as the sum of gap between players on track (with no consideration of the leader) (RRRE)

ACC shows in the HUD what it looks to be the 3rd one.

With this new "micro-sectoring" approach it now gets closer to the game display while not being perfect, I don't know how ACC is approximating it, but making it closer to ACC would not necessarily make sense as SimHub must share this algorithm with many games. Overall it's now closer to ACC display and much more stable when it comes to speed changes (turns/hairpins ...)

On this example I took a case with a very large gap so it emphasis the differences, it's now under 1s on a huuuge 30s gap :

  • First delta column shows the method 2 which could be considered as valid in a "relative" display.
  • Second delta (in the red rectangle) column shows the method 3 which matches much better what the game shows. image

On the downsides since it's based on "observation" instead of mathematics when captured data is missing the gap won't be computed,

SHWotever avatar Jun 23 '23 13:06 SHWotever