[REL] DAMPlugin for rF2

Discussion in 'Other' started by Lazza, Jul 18, 2015.

  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Ok, let's try another version. I'm sticking with the 0.76x just because I'd like more people to test it before I replace 0.76.

    So, 0.764 it is:

    https://www.dropbox.com/s/ejtykurfmtjb5m3/rF2_DAMPlugin_Handler_v0_764.zip?dl=0

    Changes:
    • Increased memory use slightly to speed up processing a little (don't panic - going from 20-40k allocated up to around 120k, so if you have memory issues it's not from this!)
    • Adjusted the logging start/stop cues to hopefully make driver swaps work. This does have the side effect of delaying the start and stop of normal logging just slightly, which shouldn't have any impact on the start of the log (up to 0.2s delay shouldn't really be noticeable) but you might find the end of the log has values 'reset' to strange values (which are the telemetry values provided when at the monitor).
    • When a log contains no complete timed laps it should no longer show a false laptime in the i2Pro file open dialog.
    • Added corrections for realtime-loss during logging, to keep lap boundaries correctly placed in the logged data.
    • To make the above more visible, I've also added a "Realtime Loss" channel which shows how much time was lost in each second. I would suggest creating a channel report and showing the max value of this channel for each lap, you could also create a new expression with the formula "integrate('Realtime Loss')" and show its Change per lap in the channel report, which will show the total time lost in that lap. (this shouldn't be used as an indicator of true laptime were the slowdowns not present - it's more a diagnostic tool)

    I'm hoping the earlier reported timing issues won't be present anymore, but if so I'll try to reproduce and investigate it. I'll go back over this thread for other reported problems and try and rectify if they're still present, but if anyone finds more please let me know.

    Still to do:
    • Make the plugin recover temp log files after a game crash (note that data won't be complete right up to the point of the crash, but game crashes are hopefully rare anyway. This is more about recovering some information from a lengthy stint)
    • Rearrange some of the channel configs to better reflect typical usage. E.g. probably make Ride Height standard. I'd welcome suggestions on this, perhaps by PM to avoid lists here that might later be confusing.
    Long enough post I think. If I've forgotten something I'll mention it later. Oh, it's likely some heuristic virus scanners will give a warning/detection for the .exe file, which seemed to start from the previous version. These heuristic scanners try to detect unknown viruses and will pick up 'virus-like' code - my installer drops files into folders (rF2 folders) and deletes files (the plugin files) and may well be marked as suspicious. By no means should you ever ignore such a warning (it's a useful prompt to check where you got the file from) but my system is testing clean and an online scan at virustotal 'only' gave 4 positives out of 66 engines. If this version tests ok and I release a 0.77 I'll also provide the plugin files for manual installation.
     
    Dhurara, tagada83, M Lynn and 4 others like this.
  2. joaopitaes

    joaopitaes Registered

    Joined:
    Nov 5, 2017
    Messages:
    33
    Likes Received:
    8
    Hi there.
    I am having an issue seing some channel data on Motec.
    Some channels are missing data. Channels like Steering angle, Break position, rear tyre temps, fuel consuption and some more.

    Can someone help me please?
    Much appreciated.
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    The standard project in i2Pro uses channel names that don't exist from my plugin. Press V in i2Pro to see a list of logged channels on the right - you need to add/modify the graphs to show those channel values, instead of the ones that come with the project. For example you'll notice the rear tyre temp graph shows a single rear tyre temperature channel, but on the right there are 3 channels for each tyre (same as the fronts). If you add those instead you'll be able to see them on the graph.

    Fuel consumption you can add a Channel Report, add the Fuel channel, and tick "Change" to see the fuel consumption per lap.

    Hope that gets you started.
     
  4. joaopitaes

    joaopitaes Registered

    Joined:
    Nov 5, 2017
    Messages:
    33
    Likes Received:
    8
    Thanks for the quick response lazza.
    Ill try that as soon as I can.

    Really apreciate your work.
    A Big thank you!
     
  5. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    738
    Likes Received:
    524
    @Lazza

    I made a math expression to calculate the avg fuel consumption per lap in the entire stint. My problem is that the "Lap Number" channel doesn't have decimals, and the plugin doesn't have other channel to do the job correctly.

    I use the SHQM_HUD, this HUD shows me the lap decimals in the track, like "2.5" when i'm in the middle of the second lap.

    So my calculations are inaccurate in Motec. Any alternatives or plugin update in the future?

    upload_2018-3-10_23-30-7.png
     
  6. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @ebeninca I haven't done that sort of thing myself, and I feel like there could be some smart way to do this, but you might be able to get away with making your own lap number expression with something like:

    'Corr Dist' [m] / stat_max('Lap Distance')

    Oh, and you might run into problems using stat_end now that logging potentially ends after re-entering the garage. Maybe try stat_min instead.
     
  7. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    738
    Likes Received:
    524
    Thx, it works.
     
  8. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    738
    Likes Received:
    524
    I tested more times, and when i'm a second stint in the same session, this expression doesn't work correctly:

    'Corr Dist' [m] / stat_max('Lap Distance')

    Lap one and two are registering lap number as 0.1, laps three and four as 0.2, etc...

    Any alternative?
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @ebeninca I don't know i2Pro well enough to know if there's a better way to do that sort of thing. If I ever wanted to get lap averages I'd make a plugin to collect and calculate the required data and spit out a text/HTML file.

    If that expression isn't working, is Lap Distance registering some large value or something? I can't see why Corr Dist would be unusually small. You could manually set the Venue Length in Tools->Details (Ctrl-D) and use that value instead, but obviously you need to set that each time. Are you sure you really need a single average for fuel use? I just use a channel report showing each lap and 'average' it by eye...
     
    ebeninca likes this.
  10. ckmackey

    ckmackey Registered

    Joined:
    Jan 28, 2012
    Messages:
    19
    Likes Received:
    7
    Hi Lazza, I see rF2 shows brake disc measurements in the garage after a lapping session, but is it possible to view brake wear channels inside motec?
    cheers,
     
  11. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    No, it's not provided to plugins.
     
    ckmackey likes this.
  12. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Discovered an oversight that means short tracks may not have the laps captured correctly. I'll fix that in my code now, it'll be in the next update.
     
    M Lynn likes this.
  13. Oumdaz Melo

    Oumdaz Melo Registered

    Joined:
    Jul 7, 2012
    Messages:
    22
    Likes Received:
    6
    Hi Lazza,
    First of all thank you for your great work, i hope you will continue to make updates.
    And second i have an issue with the v0.763 version, I don't have the right lap times, can you fix it plz ?
     
  14. Wergilius

    Wergilius Registered

    Joined:
    Jul 5, 2017
    Messages:
    157
    Likes Received:
    64
  15. Oumdaz Melo

    Oumdaz Melo Registered

    Joined:
    Jul 7, 2012
    Messages:
    22
    Likes Received:
    6
    thank you for your answer but yes same issue on some tracks
     
  16. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    I've started a private conversation with Oumdaz to try and identify and fix the problem.

    *Ok, quick update on this, it seems very likely it's the same issue I've mentioned above (mainly on short tracks), but on lower data rates or with fewer channels being logged it may happen on longer laptimes (around 1:25s in this case). I'll hopefully have the next update done soon and that should fix this. Or I'll definitely have something to follow up ;)
     
    Last edited: Mar 24, 2018
    Oumdaz Melo likes this.
  17. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Updated to 0.77 in the first post.

    Fixes:
    • Recent changes had introduced a bug with lap timing with short laptimes, causing multiple laps to sometimes appear as one in i2Pro. Should be fixed now.

    Changes:
    • Now attempts to build temporary log files leftover from previous sessions, on game exit. This will generally only happen when rF2 crashes in the middle of a session. Note that this will only work on logs recorded using the same logging options as the current ones (data rate, channel groups, precision, etc). So, if rF2 crashes and you want to recover (most of) the logged data, start rF2 again and then quit - the plugin will find and build any temp files it finds. You can interrupt/abort this process by pressing Esc.
    • I had missed including the track length in the log file. It's now in there and accessible as channel/value 'Venue Length'.
    • Internal cleanup... hopefully didn't introduce any bugs...
    • Driver swap and general activation is unchanged from 0.764, which appears to capture all data correctly across driver swaps. It doesn't always write the log file immediately, this appears to be an rF2 bug where it sometimes doesn't activate plugins.
     
    DA, Dhurara, Oumdaz Melo and 4 others like this.
  18. whitmore

    whitmore Registered

    Joined:
    Feb 26, 2012
    Messages:
    552
    Likes Received:
    142
    HI Lazza, file keeps getting deleted when I download it.

    Threat.JPG
     
  19. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Hey @whitmore , grab the manual install archive in the first post.
     
  20. whitmore

    whitmore Registered

    Joined:
    Feb 26, 2012
    Messages:
    552
    Likes Received:
    142
    Thanks Lazza that did the trick. All good with that download thanks.
     

Share This Page