[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 0.76

    - Finally added direct detection of steam installs, so you shouldn't need to go and select your primary rF2 folder on steam.
    - Added Body Roll/Pitch, X/Y/Z rotation speed and acceleration
    - Tracks or cars with slashes \ / in the name should log to the correct folders (slashes replaced by _ underscore)
    - I've added a Steering Wheel Position channel. The default steering wheel gauge just needs to be pointed to that channel, and it's best to set the min and max to -90 and +90 (manual) so the gauge matches your wheel. Note I've taken the 'physical wheel rotation' from rFactor, so it may not match what's shown on screen (should match what you did with your real hands, steering wheel lock adjustment notwithstanding)
    - I don't think I'll ever add a Steered Angle channel. The only sensible way to arrive at this value is to average the Toe of the front wheels, possibly weighting them by wheel load in some way (to reduce the effect of Ackermann), and i2Pro can do that sort of stuff itself. Doesn't make any sense to use extra CPU cycles or log file size just to have the channel logged
     
    Last edited: Jan 26, 2017
    Davvid, TJones, Dhurara and 2 others like this.
  2. whitmore

    whitmore Registered

    Joined:
    Feb 26, 2012
    Messages:
    552
    Likes Received:
    142
    I use 900 deg in Logitech profiler and adjust steering range for each car and steering lock per car. Will -90 and +90 limit the channel to showing 180 deg of wheel movement?
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @whitmore No, it just tells it how much input equals 90 degrees either way. It'll rotate as much as necessary.
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    Test version 0.761

    <outdated>

    Just a couple of adjustments for this one:
    • Changed lap detection code, this should separate the formation lap from Lap 1 in a race. From what I can see it should work with recon laps, but I haven't tested it.
    • Using a different method to check for being in the car, and for finding which car is player controlled, in the hope of making it work through driver swaps.
     
    Last edited: Mar 17, 2017
    lemming77 and marmagas like this.
  5. Josh.H

    Josh.H Registered

    Joined:
    Dec 19, 2013
    Messages:
    45
    Likes Received:
    9
    Thanks for trying to get it to work Lazza.

    Did a few tests and found some issues:
    Something's wrong with the logs after taking over from a driver swap. The driver name, track name, vehicle class and vehicle name are missing from the .ld file. I tried it twice and both logs contain what looks like approximately 42MB of null characters a few minutes into the data and i2 isn't displaying any data after they start.

    The data looks fine when handing over the car to someone else but it didn't write the log when I exited to the monitor after the swap, it waited until I exited the game. Maybe the game isn't calling ExitRealtime when you escape to the monitor after completing a driver swap?

    My DAMPlugin config is attached and the log files are here: https://www.dropbox.com/s/v36paleqoxtjgp3/Motec Driver Swap Logs.zip?dl=0
     

    Attached Files:

  6. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @Josh.H thanks for that, I'll see if I can work out what's going wrong :)
     
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    Attempt #2 on the driver swaps...

    <outdated>

    Hoping it waits until you're properly in the car before it does its stuff, and captures your name etc. I'm also hoping it just appeared to be doing nothing when you jumped out of the car, but if the data works properly this time we'll know for sure.

    Cheers!
     
    Last edited: Feb 18, 2018
    Corti likes this.
  8. Josh.H

    Josh.H Registered

    Joined:
    Dec 19, 2013
    Messages:
    45
    Likes Received:
    9
    Works fine when taking over from driver swaps now. The driver name, track name, etc. are all there. :)
    It still doesn't write the log until you've exited the game after handing over the car to someone else. Also if you do two driver swaps (i.e. Motec Driver > Some other driver > Motec Driver) without exiting the game it treats it as a single stint and writes it all to one log file.
    I'll test formation and recon laps later tonight.
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    Sweeeet!

    Ok, I'll try and see what I might be getting wrong with the exit from realtime after a driver swap. Shame, I thought that bit was ok lol

    Excellent testing Josh, you need to get a life :D
     
  10. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @Josh.H Just to confirm, I take it the logs were normal size then? The bulk of the 45 megs from your other logs looked like false 'padding' caused by those missing values, so I'd expect your new logs will be normal size. Just want to make sure the logs still aren't growing for no reason and maybe taking a long time to build at the monitor (then finishing off at full speed when exiting rF2). Thanks!
     
  11. Josh.H

    Josh.H Registered

    Joined:
    Dec 19, 2013
    Messages:
    45
    Likes Received:
    9
    Yeah the logs were normal sized. The size of the .ldtemp file stopped growing after I did the first driver swap and didn't start growing until I took control again. Here's the log file if you want to have a look: https://www.dropbox.com/s/s4sxg9p9t6gosbe/2017-02-26 - 18-31-01 - Watkins Glen Stockcar - P1.ld?dl=0
    You can see where it started recording the second stint if you look at the session elapsed time channel.
     
  12. Karei

    Karei Registered

    Joined:
    Jun 10, 2016
    Messages:
    93
    Likes Received:
    73
    Are rear Toe channels working properly? Toe RL is always positive, while Toe RR is always negative (except with 0 Toe, than the result varies, but they're never the same as in front Toe channels).
     
  13. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    Thanks @Josh.H, doesn't help me not knowing why it's not building after a swap out but at least it confirms that's the case.

    @Karei your front wheels are used to turn, your rear wheels are not. The rear toe therefore doesn't change much.
     
  14. lordpantsington

    lordpantsington Registered

    Joined:
    Oct 5, 2010
    Messages:
    849
    Likes Received:
    79
    Something to think about: What happens with data logging and having the AI drive? IIRC the physics engine simplifies. Isn't that the same sort of thing you see with a teammate driving? I imagine looking at CPU load would give some indication.
     
  15. CIGS

    CIGS Registered

    Joined:
    Mar 1, 2017
    Messages:
    1
    Likes Received:
    0
    Hello, someone can help? silly question... i used to use motec 8 years ago in rfactor, now its a little different for ex: To add a channel ride height, shows only front, rear and center instead ride height FL,FR,RL,RR like before in the oldest motec versions. How can i make the math? Thanks in advance...
     
  16. Josh.H

    Josh.H Registered

    Joined:
    Dec 19, 2013
    Messages:
    45
    Likes Received:
    9
    I tested using the example plugin and the game does not provide any telemetry updates while spectating. It is providing updates when the AI is in control and looks the same as when a player is in control apart from some channels not working (e.g. tyre temps, aero channels), probably because of the simplified physics model you mentioned.
     
  17. NikBertz

    NikBertz Registered

    Joined:
    Mar 17, 2017
    Messages:
    2
    Likes Received:
    0
    Hi Lazza very thanks to your works for this plugins to use motec.
    a question, that is not properly on rfactor2, but the old rfactor 1..
    i race again in rfactor 1 and need to use motec but i dont'know if your last release (rFactor (1) Motec Plugin - v1.10, 14th Feb 2012) works with last version of game (1.255g lite) and with last version of motec.
    in last time for rfactor i use Data Acquisition Plugin 1.32 by DanZ but this plugin is too much old and motec don't run fine.. steered angle and oversteer don't send nothing (in motec the graphics is always 0) also with motec version pro-wxp_1.01.0082 (very very old version).
    the question is.. what is the last version of your plugin (1.10?) and what is the last version of motec that run correctly with your last version plugin? and run correctly with version game 1.255g lite?

    thanks to much lazza!!!! and sorry for my bad english.. :(
     
  18. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @NikBertz I haven't done another rF1 plugin version since that one. It won't work properly with the ISI-licensed version for things like brake wear (I only ever had the Trymedia version installed), but it should produce data compatible with any of the 1.0.x versions of i2Pro. It won't work with the 1.1.x versions, for sure.
     
    NikBertz likes this.
  19. NikBertz

    NikBertz Registered

    Joined:
    Mar 17, 2017
    Messages:
    2
    Likes Received:
    0
    @Lazza very thanks lazza. last question then close off topic.do you think its better reinstall rfactor with version 1.255f, or the last version 1.255g it works?
     
  20. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,346
    Likes Received:
    6,572
    @NikBertz I couldn't really say, I haven't run rF1 since 2012.
     

Share This Page