[REL] DAMPlugin for rF2

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

  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    Updated to v0.81

    Changes:
    - Fixed some timing code to avoid corrupted log files as experienced by some users
    - Added some checks to the building code to reduce game freezes (not crashes) when exiting rF2 with bad logs
    - Changed the error wording when users don't answer correctly, to better indicate the reason.

    I'm pretty sure I haven't broken anything, I'm going to reorganise some code because it's a bit messy and difficult to bugfix right now, if you have any problems please let me know.

    - Oh, I also slightly changed the Handler packaging. I think it might be a bit better with most antivirus packages now.

    Cheers!
     
    Corti, tchodz, andrea_274 and 3 others like this.
  2. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    Hi
    I don't know if it is only me or there is something to fix but when I Open Log File I get this:
    [​IMG]

    Files without any valid laps have 38805 or 38185 total laps listed. Do you know if I can fix this on my side or this is a bug (or feature) ? :) (It makes sorting stints inconvenient).
     
    Last edited: Apr 23, 2019
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @Davvid I can't see the image above, quite a while ago I made the plugin create an empty info file next to the log when no laps are recorded, which should make it show 0 laps in the file open dialog. Correction: Fastest time shows 0.

    If you can confirm you're on a recent version of the plugin, and fix that picture so I can see where it's wrong, I'll take a look.

    (I need to revisit that anyway, the empty file prevents adding notes to the log in i2Pro)

    @Davvid sorry, early-morning brain didn't work right. Indeed the Total Laps does show strange numbers, I'll work on this at some point.
     
    Last edited: Apr 23, 2019
  4. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    Maybe linked version will work for you:
    https://prntscr.com/nftasq

    It happens for sure on 0.74 and current 0.81. I looked my logs way back and I see that in 2017 season it worked better (I must have had earlier version of your plugin): fastest lap was blank and Total Laps was always 1 in the motec dialog:
    http://prntscr.com/nfzlz4

    Thanks in advance :)
     
  5. durielk

    durielk Registered

    Joined:
    Dec 19, 2016
    Messages:
    45
    Likes Received:
    2
    I'm trying to setup DAMP... but the manual install does not have the *.ini file or say where it goes. The auto install dl says it has a virus so I dl'd it from another site and ran it. ... but it is stuck on the screen where you look at your 'rF2 Folders' and I found my install and put it in the window then hit 'add' and it wants to add a folder, but when I do it just goes back to that 'rF2 Folder' screen and never moves on where I can hit install, on the right side of that screen it sayes 'Unknown Plugin version'?

    WTH?
     
  6. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @durielk I wouldn't recommend downloading from other sites. It's just a bad idea generally.

    There's no virus (as much as anyone can say that with confidence) but if your antivirus doesn't like it that's what the manual install is for.

    The DAMPlugin.ini gets created by the plugin when you start the game. The first post explains that. So try a little less 'WTH' and a little more reading.
     
  7. durielk

    durielk Registered

    Joined:
    Dec 19, 2016
    Messages:
    45
    Likes Received:
    2
    OK, sorry for the 3 letters, but I am a little flustrated with my new rF2 install and setup. Thanks for your work, I have seemed to somehow got the Motec to run and it is putting out some good data.
    …. But, there is always a … but…
    The instructions are really not that clear, in it’s own words…” In DAMPlugin_Handler, Add an rF2 folder, then Install the plugin to it.” For a non-computer geek, when it says “install the plugin to it”, I assume I need to do that. As previously described, I never did ‘have’ the ‘plugin” to install as you said it creates it automatically, and I found it after your post. And that auto install program, after you pick the folder seems to be in a loop, if that all it’s suppose to do, I would have written it to ‘close’ after you pick the folder.
    As far as the virus thing, my W10 was closing that auto program out, was not going to run, no way, no how. W10 was taking over and getting that zip the H off the HD ASAP pronto!
    Also I was getting confused with all the other ‘install’ issues, you want to hear about them? This includes a description on adjusting the 1 & 0’s to get the Motec to look at the tires and stuff, which honestly I can’t even find anymore as I write this.
    I haven’t been doing any drugs… today, so I’m making an honest attempt move this install forward.
    Regardless, again, I very much appreciate your effort on this matter and taking your valuable time to help an idiot get it going.
    THANK YOU.
     
  8. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @durielk I just try not to repeat instructions that are in the first post. Using and configuring i2Pro itself isn't a 2-minute job, so there's an inherent level of self help and working things out.

    You said the handler wouldn't let you install as it said the version was unknown. That means you have an old version of the handler, because you got it somewhere else. I get that the whole handler seems a little pointless (though it at least makes a person understand that they shouldn't contact Motec for assistance, when first run) as I planned further functionality that hasn't happened, but it still works for installing the plugin. It's also still useful for anyone running more than one rF2 folder (rare these days, but you never know).

    The first post has a section on DAMPlugin.ini, describing where and when it will be created and some of the options it will have. It then further describes some of the sections in the DAMPlugin.ini and what their options do. It links to a list of all logged channels showing what groups they are in. The DAMPlugin.ini file itself (when you find it, as per first post instructions) has comments all through it explaining what it does. If any of them don't make sense or seem complicated you probably don't need them. If you think you do and you can't understand the instructions either in the first post or in the ini file itself, feel free to ask specifically about them here and I'll help.

    PS It sounds like you need to install the current version of the plugin still, via the correct version of the handler (you do need to click Install) or extract and overwrite the files from the manual install archive if Defender keeps blocking the Handler program.
     
    Last edited: May 6, 2019
  9. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    Hey Lazza,

    great work with the DAMPlugin. Thanks a lot!
    Would you mind sending me the .ld/.ldx file format specifications? I'd like to dabble a little bit and see if I can export accurate track maps from rF2 into Motec (or at the very least smooth my track boundaries, my slow driving isn't particularly good :p).
     
  10. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    You don't need those files, the track maps are stored in other files in i2Pro. I had a trackmap generator with my rF1 motec plugin, which used the .aiw files for the tracks to generate accurate trackmaps and avoid the need for doing slow driving. I gather from a post someone did that format must have changed in some way in later i2Pro versions as that generator was no longer working, but in rF2 many of the tracks are encrypted (and are always packaged) so I haven't bothered looking into it.

    Generating a map from live data might be ok, but the data will be quite low frequency (current distance from the track centre, and the track boundaries, is 5Hz) and more importantly the track edges can be overridden by AIW cut zones. So if a section of straight has the cut zones out at the fence, the game will report the track edge to be at the fence. Not very useful.

    As a general rule, I won't share any details of file formats (so that includes the trackmap file formats) as they are proprietary and any tools that circumvented the use of motec products (loggers etc) with the use of i2Pro, based on my information, could leave me in hot water. I recall the track files being easier than the logs themselves, and maybe one day I'll look at them again, but because of the AIW situation it's not really a worthwhile endeavour in my opinion.
     
  11. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    You can generate track maps via slowly driven laps, which are stored in .ld files.

    Live data? Do you mean by driving slow laps? How else would I generate a decent track map? Especially since this is what Motec itself is recommending.

    Debatable. Especially since Section 103(f) of the Digital Millennium Copyright Act explicitly states that reverse engineering to achieve interoperability, which is exactly what's achieved here, is legal. The EULA of Motec might disagree, but it's been found to infringe with the DMCA (see this). Same applies to the EU, by the way (Article 6 of the 1991 EU Computer Programs Directive).
    However, I understand and respect your decision. Guess I'll have to break out Ida and 010, I mean, look for other solutions.
     
  12. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    No, they are stored in .mt2 files. You'll find them in your workspace folders (probably in Documents).

    No, I meant via game data (plugin) while driving. Probably not what you were thinking at all, hence the confusion.

    This wouldn't be a matter of copyright, it would be direct damages if knowledge of the file formats was used to produce hardware that competed with Motec's own. I've had requests from people looking to do exactly that. I'm sure my liability would be reduced if I didn't know it was going to be used that way, but I prefer to steer clear :)
     
  13. Leandros

    Leandros Registered

    Joined:
    May 8, 2019
    Messages:
    12
    Likes Received:
    3
    Ahh, good to know! Thanks. However, what I actually meant, is that the laps are stored in the .ld log files, which are used to generate the track map.

    Alright, understood.
    What's your suggestion for generating good track maps? Driving three slow laps (inside, outside & driving line)? Driving multiple slow laps, averaging each, to improve accuracy? I've seen that newer i2 Pro versions actually allow smoothing of the lines, which was exactly what I initially intended to do.
     
  14. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @Leandros Well, I should start by saying I don't use i2Pro very much. When I need to check something basic I'll fire it up of course, but unless I felt like I was very close to the limit with my driving I wouldn't worry too much about fine setup details. My rF2 driving has been sporadic so I find I still have lots of time to gain just by spending more time at the wheel. Sometimes I find some of that time, sometimes it goes missing again later.

    As far as the maps go, even in rF1 with the generated outline that actually matched the track edges I found I was comparing laps to each other more than I was checking where on the track I was - you can see that at the time, or via replays in the game. I've occasionally compared lines in rF2 but just by looking at the GPS of the laps - if I'm comparing laps it's to try and work out which approach is best, so they'll both be clean laps. And again I can tell on a replay if I'm not using the whole track width, actually better than on the i2Pro map (vehicle width and specific surfaces / areas are hard to judge).

    If you're a fan of it, I personally found just driving the inside and outside lines once was good enough, not being too fussy except in the slower corners where the boundaries actually matter more. Driving line I'd continue to use a fast lap as that will best replicate the lines you'll be taking in your actual laps - which makes distance comparisons in the graphs more useful.
     
  15. thoraxe

    thoraxe Registered

    Joined:
    Dec 25, 2016
    Messages:
    149
    Likes Received:
    15
    I am about to start working for a company that makes a data analysis tool and we can probably work with the MoTeC files. Question about the GPS data -- would you be willing to work with me to create some kind of "offset" file/mechanism for tracks so that we can map real-world GPS coordinates to the data your plugin generates?
    @Lazza
     
  16. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    I think you'd be much better off just logging data to your own file format. Why use Motec's?
     
  17. thoraxe

    thoraxe Registered

    Joined:
    Dec 25, 2016
    Messages:
    149
    Likes Received:
    15
    Because you already export to MoTeC's format and we already import MoTeC's format. So instead of reinventing the wheel, a tiny modification to your plugin completes the circle.

    Otherwise we have to basically start from scratch / take an existing plugin and modify it. We don't have a "format". We import other systems formats -- MoTeC, AiM, etc.

    IIRC the CSV telemetry plugin didn't export actual velocities and hasn't been updated since 2014. See:
    https://forum.studio-397.com/index.php?threads/rf2-telemetry-csv-plugin-v4.42198/page-4#post-921136

    The realtime telemetry software:
    https://forum.studio-397.com/index.php?threads/project_rf2-realtime-telemetry-software.52298/

    May or may not export CSV. I haven't reinstalled it yet to play with it. It's also not really designed to be spitting out telemetry _data_ like yours is.
     
  18. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    I still think any GPS modifications should be done at your end - and would be a better option for you. By correcting/adjusting the GPS data in the log files, you require any logs to be recorded with the correct version of the plugin and with the correct data file (assuming for the moment a data file would be used to apply the correction). If you later found out that the GPS data still needed a further correction (which wouldn't just be limited to position and orientation - my GPS coordinates assume a spherical earth) you'd need to change that input data file to adjust it, and then any historical logs wouldn't be matched anymore.

    If your software has a list of track names and lengths (which should uniquely identify 99.9% of tracks out there) and the corresponding GPS corrections required, all my logs would come in and you can further adjust and correct as needed (and all historical logs are then also corrected). On top of all this, obviously, is that the game data will likely never properly match up with real life data due to inaccuracies, so anything in that area would be fruitless. And at that point I think you need to consider how useful the entire endeavour would be.

    Now obviously if your projects involve consistent track layouts across various input platforms and formats you can still have useful GPS data. But I maintain your best option is to apply any corrections in your software and keep them in your control.
     
  19. thoraxe

    thoraxe Registered

    Joined:
    Dec 25, 2016
    Messages:
    149
    Likes Received:
    15
    Sounds good. I took a look at the example plugin and we might be able to get some minimal data export thrown together pretty quickly.
    I was able to directly import your exports but because of the GPS and other data things we just detect the entire session as one lap. i2Pro does show everything, though, which is rad.
    Thanks!
     
  20. J853

    J853 Registered

    Joined:
    Apr 12, 2018
    Messages:
    23
    Likes Received:
    6
    Hi,
    I'm finding some of the channels don't seem to log anything even if they are enabled in the config file for the plugin.

    For example the lateral and longitudinal tyre force channel seems to be empty of data when I look at it in the motec viewer.

    Is there any way to solve this issue?
     

Share This Page