[REL] TinyPedal - open source overlay APP for rF2 (Radar,Pedal,FFB,Deltabest,Relative,Fuel calculator)

Discussion in 'Other' started by svictor, Mar 14, 2022.

Tags:
  1. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    6,019
    Likes Received:
    3,500
    until or if that can be added, you can set your mfd/led screen to show the race information. The counter will begin the moment the race starts and you can use that if the track lights are not visible.
     
    svictor likes this.
  2. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    Yes, I have been thought about adding something that could indicate race start, however there is a few concerns:
    1. Startlight info comes from mStartLight value of sharedmemory API, however this value has 5fps or 200ms update rate. This means there will be a huge margin of error for using this value from API. IMO Startlight is useless without high accuracy.

    2. If first issue is solvable, then comes second concern. Since startlight is only useful for start of race, creating a separated widget only for displaying startlight is not efficient, as every widget is a window. It would be best that startlight can be bundled with other widget, so this needs a good design.

    So, with all that said, I agree with Dave that current best option is still to watch game's HUD status or sound.

    PS: next update plan is to add a car instrument widget that will show assists, toggles, indicators, etc.
     
  3. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    2,936
    Likes Received:
    1,863
    I agree with you that it's not accurate, and understand that to develope a thing that you know previously that you can't do it well, doesn't motivate.
    But if you see this "unnacurate widget" from the point of view of the guy that is at the back of the grid and doesn't see the starting lights, the thing is different. ;)
     
    svictor likes this.
  4. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    v1.6.0 update - new Instrument Widget
    upload_2022-6-24_22-26-36.png
    DL: https://github.com/s-victor/TinyPedal/releases/tag/v1.6.0

    The new Instrument Widget includes 5 useful and very important car instrument indicators, and is highly customizable (and very well optimized with very low CPU usage).
    Note: wheel lock & slip indicator requires at least one full lap before it can get accurate wheel radius for calculating slip ratio for a given vehicle (wheel radius of last driven vehicle will be auto-saved to config.json file).

    As usual, make sure to read Customization Guide:
    https://github.com/s-victor/TinyPedal/wiki#instrument

    TinyPedal 1.6.0 (2022-06-24)
    • [New]Instrument Widget
      • Show Headlights state.
        When Headlights on, icon turns white.
      • Show Ignition & Starter state.
        When Ignition on, icon turns white.
        When Ignition on while Engine off, icon background turns green (default color).
      • Show Auto-Clutch state.
        When Auto-Clutch on, icon turns white.
        When Clutch pressed, icon background turns cyan (default color).
      • Show Wheel Lock state.
        When Brake pressed and Slip Ratio reaches threshold, icon background flashes red (default color).
      • Show Wheel Slip state.
        When Slip Ratio reaches threshold, icon background flashes yellow (default color).
      • Include many customizable options.
      • New instrument icon by Xiang.
    • Cruise Widget
      • [New]Show current in-game clock time of the circuit.
    • Core
      • Fixed an issue where Deltatime module would fail to record deltabest laptime
        for point to point tracks after certain amount driven distance.
      • Various optimization.
      • Updated build_py2exe.py script.
    • Misc
      • Updated customization guide with new configurable setting for Instrument & Cruise Widget.
      • Updated features.md with Instrument Widget info.
      • Updated README.md.
     
    Last edited: Jun 24, 2022
    felan, yashiman, Dave^ and 10 others like this.
  5. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    6,019
    Likes Received:
    3,500
    Wheel slip with rF2? We haven't seen any of the GT DLC cars that have that in real life have it modeled in rF2 have we? (so good job!)
     
    svictor likes this.
  6. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    605
    Likes Received:
    347
    Definitely he is doing some calculations here.
     
    svictor and davehenrie like this.
  7. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    v1.6.1 update - Race Countdown Timer for Gear Widget
    upload_2022-6-29_12-44-30.png
    DL: See v1.6.2 instead

    This update mainly fulfills the recently request of Startlights function, which is realized in the form of Race Countdown timer. It will be shown on Gear widget during countdown game phase for standing-type start only(includes formation/standing), and has a 20ms accuracy.

    In case of doubt & question about legitimacy of Race Countdown timer (as inevitably):
    1. Countdown timer is calculated using the formula below,
      Seconds to start = mLapStartET - mElapsedTime
    2. Both mLapStartET & mElapsedTime values are part of rF2's standard API.
    3. mLapStartET exists long since RF1.
    4. The interaction between the two values has been well known by players/programmers (if not by many), and has been used by some Plugins/APPs/Overlays for years, there is no secret.
    5. Both values are also essential for calculating player's current laptime, which is the reversed formula as below,
      Laptime(sec) = mElapsedTime - mLapStartET
    There is NO hack, NO cheat involved. Whether to use this feature, or disable it from config.json file for maximum ethics & realism, is up to user; or, if RF2's DEV ever wishes to block access to this kind interaction.

    Other improvements of this update include significantly increased accuracy of wheel radius & slip ratio reading for Instrument Widget, as well as many small optimization.

    Enjoy

    Edit: for faster cars, especially formula or prototype, increase "minimum_speed" value is advised (for example, value of 50 means APP will only record radius data when speed is above 180kph, this helps filter out invalid low speed spin data). See changelog below for details.

    TinyPedal 1.6.1 (2022-06-29)
    • Instrument Widget
      • Add new "minimum_speed" setting in config file, default value is 16.5 (m/s),
        which is the minimum speed threshold before APP can record wheel radius samples.
      • Add new "minimum_samples" setting in config file, default value is 400,
        which is the minimum number of radius samples that required for calculating average wheel radius.
      • Both settings significantly increase accuracy of wheel radius reading.
    • Gear Widget
      • [New]Add an optional Race Countdown timer for standing-type start only(includes formation/standing),
        which only shows during countdown game phase, and has a 20ms(50fps) accuracy.
      • Add "show_countdown" setting in config, set value to false to disable Race Countdown timer.
        Note:
        • Countdown timer is calculated using the formula below,
          Seconds to start = mLapStartET - mElapsedTime
        • Both mLapStartET & mElapsedTime values are part of rF2's standard API.
    • Wheel Widget
      • Fixed wrong "rideheight_offset_rear" reference.
    • Core
      • Various optimization.
    • Misc
      • Updated customization guide with new configurable setting for Gear & Instrument Widget.
     
    Last edited: Jun 30, 2022
    Guillem Rego, lagg, GPNeville and 8 others like this.
  8. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    v1.6.2 update - Startlights display for Gear Widget
    upload_2022-6-30_12-18-38.png
    DL: https://github.com/s-victor/TinyPedal/releases/tag/v1.6.2

    This update brings a new proper Startlights display feature for Gear Widget, with 20ms accuracy, which is 100% legit.

    Also, due to concerns that raises within our league regarding the use of Countdown Timer, I have decided to disable Countdown Timer feature by default.

    Note: Countdown Timer can still be enabled by editing config.json with a special code as documented in customization guide. It is meaningless to hide this as people already knew it for years and used on other HUD app. However it is better that user understand the consequences and potential unfair advantages could gain from Countdown Timer before trying to use it.

    See customization guide for full details:
    https://github.com/s-victor/TinyPedal/wiki#gear


    TinyPedal 1.6.2 (2022-06-30)
    • Gear Widget
      • [New]Add Startlights display with 20ms(50fps) accuracy, which works the same way as how the game is designed.
      • Race Countdown timer feature is no longer enabled by default, which now requires a special code to enable it.
        See customization guide for details.
      • Fixed missing custom background settings.
    • Core
      • Increased Deltatime module refresh rate from 10ms to 1ms.
    • Misc
      • Updated customization guide with new configurable setting for Gear Widget.
     
    Last edited: Jun 30, 2022
  9. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    v1.6.3 update - Auto-save last laptime for accurate Fuel calculation & Timing Widget display
    DL: https://github.com/s-victor/TinyPedal/releases/tag/v1.6.3

    Customization guide: https://github.com/s-victor/TinyPedal/wiki#timing

    TinyPedal 1.6.3 (2022-07-03)
    • Core
      • Deltatime module now stores last laptime value to "last_laptime" key value in "timing" section of config.json.
      • Both Fuel & Timing Widget can read this saved last laptime value from Deltatime module & config.json.
      • Estimated laps & time for a given amount fuel can now be accurately calculated & displayed
        based on existing saved last laptime without having to do any additional laps.
      • Fixed a NaN value error that can happen if game crashes.
      • Optimized data handling for Relative module, Radar Widget, Relative Widget.
    • Misc
      • Updated customization guide with new configurable setting for Timing Widget.
     
  10. Matlorc

    Matlorc Registered

    Joined:
    Mar 21, 2022
    Messages:
    7
    Likes Received:
    2
    Hi Svictor,
    great job!!

    I don't know if someone already asked for it, do you think is possible to add a pedal inputs widget with a lines graph

    Pedals.jpg

    Thanks in advance
     
    svictor likes this.
  11. Capeta

    Capeta Registered

    Joined:
    May 31, 2012
    Messages:
    247
    Likes Received:
    33
    Thanks again Svictor for your dedication and work.
    I had an issue wich was on me, but who know, perhaps we can find something.

    During a race, I was keeping an eye on the fuel and as it's on the timer, it was ok, then, with few seconds left to race, the leader launched a last lap, that was going to be tight and I didn't have the ability to anticipate that, I had to serve a last second pitstop wich was disastrous.

    Do you think there is a way to make the fuel estimation somehow work with the leaders lap ?
     
    svictor likes this.
  12. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    605
    Likes Received:
    347
    I noticed something related, the fuel widget calculation doesn't consider when you're a lap behind the leader in fixed laps races, the widget should reduce one lap on total necessary fuel to end calculation.

    but I don't know if is possible to adjust it.
     
  13. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    Hi, thanks for suggestion.

    You can already estimate extra lap fuel consumption from widget, which is described in feature list:
    https://github.com/s-victor/TinyPedal/blob/master/docs/features.md#fuel
    • Show estimated total required fuel for finishing race, negative value indicates estimated extra fuel after race ends.
    Any negative value you see in "require" box is the amount extra fuel you will have left after race timer reaches zero (in a time based race), or leader crossed finish line (in a lap based race). So all you need to do is plan & test fuel beforehand, to know how much extra negative value you want to have on fuel widget display.

    For example, in a time based race as below pic shows, the amount required fuel reading is -0.5 (and last lap fuel usage is 1.47), which means you will only have 0.5 fuel left after race timer reaches zero(note, APP already counts last lap as full lap for calculation after race timer reaches zero, still it DOES NOT necessary mean leader won't do one more full lap, for example, if leader has crossed finish line just a few second before race timer ends, it will result one extra lap that APP may not foresee). And this is where you will have to do careful planning beforehand before a race. You will have to decide whether to include one extra lap fuel(that is 1.47) to total fuel, so that you don't risk being run out of fuel if leader does one extra lap, and same applies to warmup lap.
    upload_2022-7-5_11-31-49.png

    The important thing is always to plan, calculate and test fuel usage beforehand. If a race would possibly include one or two extra laps from warmup lap or extra leader lap, those should be carefully considered and included in fuel calculation. And in last 1.6.3 version, you can simply do a valid lap, then just adjust fuel level to see the estimated laps/time.

    Thanks. This shouldn't be a big problem, since the driver is already one lap behind, carrying extra fuel won't change anything. Also it is not possible to "estimate" a driver himself being lapped by a lap or two in a race so that he can carry 1 less lap fuel beforehand...

    Thanks. It is possible, but not viable currently. The GUI library used for this APP does not support GPU acceleration, this means heavy graphics display such as your suggested plotting function, would result huge amount CPU usage, which is not viable.
     
    Last edited: Jul 5, 2022
  14. Capeta

    Capeta Registered

    Joined:
    May 31, 2012
    Messages:
    247
    Likes Received:
    33
    Thanks for that explanation.
    Funny thing is, I did a full race distance to check fuel but the pace was so much faster because of the grip evolution wich I can't never seem to get right.
    As I said, it's on me, I should be able to do some calculations while driving. :D
     
    svictor likes this.
  15. Matlorc

    Matlorc Registered

    Joined:
    Mar 21, 2022
    Messages:
    7
    Likes Received:
    2
    ok, I understand thanks for the immediate reply
     
    svictor likes this.
  16. boxer

    boxer Registered

    Joined:
    Aug 22, 2012
    Messages:
    487
    Likes Received:
    167
    Just tried this...Great job. Reminds me of Trackmap plugin.
    One thing that would be nice is to have the title of the each widget as an option.

    1) Does it show you relative gap to car in front an car behind?
    2) How about relative sector times Like in F1. Green, yellow and purple sectors.
    3) How about a short cut Key to Toggle hiding the overlays while in the menus?
     
    svictor likes this.
  17. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    6,019
    Likes Received:
    3,500
    You can check a box to auto hide the overlay when in the pits. You can add widget titles,(although I haven't tried that yet) the link that @svictor posted has a full page or two of options you can try.
    https://github.com/s-victor/TinyPedal/blob/master/docs/features.md#fuel
     
    svictor likes this.
  18. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    Thanks.

    Most stuff are explained in "Widget function overview" section of first post of this thread. Of course many new widgets have been added since, so some widgets may not be mentioned in that section. However you can find descriptions from feature list, as well as previous version release posts which includes pictures. (I'll try to keep widget function overview up to date, when time allows)

    Most of the widgets functions are easy to understand once you have driven a few laps.

    Widgets are designed to be as simple as possible. If adding caption to every widgets, that will seriously overwhelm driver view, and it will downgrade APP performance, as well as making APP more clumsy and difficult to code. So only those widgets that absolutely necessary to have captions, would have them.

    Relative gap is already displayed in Relative Widget, which has the most customizable options so far. Just give it a try.

    And lastly, it is not required to have every widget enabled. It is better to only enable a portion of widgets that are most useful under different condition.


    Edit: First post is now updated with all current widgets function description.
     
    Last edited: Jul 6, 2022
    Corti likes this.
  19. juanchioooo

    juanchioooo Registered

    Joined:
    May 16, 2016
    Messages:
    2,106
    Likes Received:
    1,604
    does it work in virtual reality?:rolleyes:
     
    memoNo1 likes this.
  20. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    570
    Likes Received:
    3,682
    I'm not sure, as I don't have VR. So far haven't heard anyone reported with success either.

    I have heard that some VR programs can project "windows" into VR, which potentially could work with this APP, as every widget is basically a window. However, all the widget window is set to not shown on taskbar, which other programs may have trouble to detect this kind window. Nevertheless, there is one program I know that can "see" this APP, which is OBS studio, so may be possible.
     

Share This Page