Telemetry R2M - Raceroom to Motec logger/exporter

Discussion in 'Community Workshop' started by KrisP, Mar 30, 2022.

  1. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    Hi Raceroomers!

    Here's a little utility I've been working on lately that some of you might find useful. It records RaceRoom telemetry and saves it in Motec i2 readable format.

    To keep file sizes low it doesn't use the same sample rate for all channels, e.g. the brake bias setting is recorded at only 5 Hz while the suspension channels are sampled at 200 Hz.

    It's - rather unimaginatively - called R2M and is very light on CPU (~0.01% in my tests) and memory usage, so if you want to log a 24 hour race you should be able to do so, provided you have enough disk space.

    You can read more and download it here: https://github.com/KrisP69/R2M/releases/latest

    Bug reports and suggestions are welcome.

    Changes in v1.06:
    • Added 'Lap Number' channel. (To use this in Motec i2 go to Tools->Options->Circuit and change the 'Lap Numbering' setting)
    • Selected tyre types are now noted in i2's 'Vehicle Comment'
    • Added system calls to prevent Windows 11 from down-throttling R2M
    • Re-implemented UI and process tracking logic, lowering CPU overhead
    • Various other improvements

    Fixed issues:
    • R2M could hang if the game changed state while the logging buffer was being flushed to disk. The bug fix in version 1.04 sadly didn't eradicate this behaviour completely
    • Beacons were offset in race sessions

    Changes in version 1.05:
    • Implemented a workaround to catch restarts/return to garage events in certain session types
    • Other minor improvements

    Changes in version 1.04:
    • Added the following channels:
      • Fuel Level (for ICE vehicles)
      • Battery SoC (For electric and hybrid vehicles)
      • Brake Water Level (for trucks)
      • Tyre Wear
      • Tyre Grip
      • DRS Engaged status
      • P2P Engaged status
      • TC Active status
      • Car position. Can be used for driving line analysis and creating track maps by setting up two synthetic GPS channels (*)
    • Implemented split timings (in i2 when adding a 'Time Report' change 'Range Group' to 'Splits')
    • Improved lap timings (Game UI appears to discard least significant digits when calculating sector/lap times, so 1 ms. discrepancies might occur)
    • Uses Beacon channel for timing instead of an .ldx companion file
    • Changed 'Brake Pressure' unit to [N] (i2 doesn't understand [kN])
    • Changed 'Turbo Pressure' unit to [bar] (was erroneously [kPa] before)
    • Brake Bias percentage values are now in regard to front wheel brake pressures
    • Renamed 'ABS' channel to 'ABS Active'
    • Adjusted sampling rate of some channels

    Fixed issues:
    • Logged telemetry wasn't saved if the target path contained international characters
    • Lap time wasn't recorded if on a hillclimb track and the "Discard logs with no recorded lap times" option was enabled
    • R2M could hang if game entered a paused state while logging buffer was being flushed to disk.
    • Telemetry was recorded when viewing a replay.

    (*) Setting up synthetic GPS channels:
    Create two maths channels that converts from meters to degrees. I use the following:
    'GPS Longitude' [deg] = 10 -'Position Long' [m] /111319.4917
    'GPS Latitude' [deg] = 10 +'Position Lat' [m] /111319.4917
    (111319.4917 = the circumference of Earth at the equator divided by 360.)
     
    • Like x 10
    • Winner x 1
    • Informative x 1
    • Love it! x 1
    • Wonderful x 1
    Last edited: Jul 23, 2023
  2. DonaldD

    DonaldD Member

    Joined:
    Jan 6, 2022
    Ratings:
    +13 / 0 / -0
    Oh man this is exactly what I have been waiting for.
    THANK YOU :D
    One of the reasons Im extremely excited about this is because I know from iRacing and rF2 how extremely satisfying it is to use the real (and free!) MoteC telemetry tool to evaluate ones setups.
    I guess its also positive news that you have reduced the params exported to what is relevant for car setups.

    EDIT: If you ever should think about creating a similiar "exporter" to the other sim I use AMS2 - then PM me.
    Because I would gladly pay some "fee" to you to be able to use such an exporter to that other sim.:p
     
    Last edited: Mar 30, 2022
  3. Thomas Jansen

    Thomas Jansen KW Studios Developer Beta tester

    Joined:
    Apr 5, 2018
    Ratings:
    +562 / 0 / -0
    Really nice project!

    So far the only things I would suggest adding is ABS activation (I assume we have that available in shared memory), and all brake temps. I guess you probably only included the left side brakes for front/rear to save resources?
     
  4. Mike Kara

    Mike Kara Member

    Joined:
    Jun 26, 2021
    Ratings:
    +7 / 0 / -0
    not working for me not getting any data at all
    I did full laps, half laps, few laps and I got nothing in the output folder
    it telling me that logger is activated so should work
    I'm on windows 8.1
     
    Last edited: Apr 6, 2022
  5. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    Thanks for the feedback, guys.

    @DonaldD AMS2 is another under-appreciated sim I enjoy playing, so that's probably something I'll look into eventually.

    @Thomas Jansen ABS and the last two brake temps has been added in v1.02.

    @Mike Kara Sorry to hear that. I only have access to Windows 10/x64 machines (and the release build is compiled for x64,) but I can't think of any reason why it shouldn't work on Windows 8.1, unless you're using a 32-bit machine/OS?
     
    • Like Like x 2
  6. DonaldD

    DonaldD Member

    Joined:
    Jan 6, 2022
    Ratings:
    +13 / 0 / -0
    Sounds promising.
    Then you will be my hero :D
    Then maybe I can again get some use of my MoteC workspaces from iRacing and rF2.;)
     
  7. Mike Kara

    Mike Kara Member

    Joined:
    Jun 26, 2021
    Ratings:
    +7 / 0 / -0
    8.1 Pro x64, so nothing weird
    I have no clue why it's not working but it is what it is
     
  8. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    • Like Like x 1
  9. Mike Kara

    Mike Kara Member

    Joined:
    Jun 26, 2021
    Ratings:
    +7 / 0 / -0
    installed it but it changed nothing :(
     
  10. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    I have just resurrected a very old AMD Phenom II Windows 8.1 system I had forgot about (I tried with a virtual machine first, but Raceroom wont run there) and R2M worked perfectly there, so I've really no idea why it doesn't work for you, sadly.
     
    • Like Like x 1
  11. Muzarati

    Muzarati Member

    Joined:
    Jan 27, 2018
    Ratings:
    +20 / 0 / -0
    Doesn't work for me either? It creates a log file but what data is there is all scrambled and doesn't make sense?

    I used to use this with AMS and it worked really well...was excited to see this :(
     

    Attached Files:

  12. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    I'm sorry to hear that. I'd love to figure out what the root cause is, but as it's virtually impossible for me to fix problems that I can't reproduce locally I'd appreciate if you (and anyone else experiencing problems) would run msinfo32.exe (aka. "System Information",) click File->Save and then PM me the resulting .nfo file together with a description of the issue - then hopefully some common factors will pop up. I'd also like to examine the corrupted log files you recorded, so please PM me them if you can.
     
    • Like Like x 2
  13. Muzarati

    Muzarati Member

    Joined:
    Jan 27, 2018
    Ratings:
    +20 / 0 / -0
    Will do after the Easter break, thanks :)
     
  14. Alex Hodgkinson

    Alex Hodgkinson KW Studios Developer

    Joined:
    Jun 5, 2017
    Ratings:
    +1,948 / 0 / -0

    Excellent work.

    Is there a reason that only left-side brake temperatures are being logged currently? I'm positive we send right hand side values to shared mem.

    upload_2022-4-29_13-56-20.png
     
    • Agree Agree x 1
  15. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    R2M v1.04 has been released. I've updated the first post of this thread with a list of changes/fixes.
    Thank you for the kind words and sorry for my very late response (in my defense I had a lot to see to shortly after my last posting here so R2M and sim racing were put on the back-burner. Then came the hot summer.)

    To answer your question, is it possible you're using an earlier version than 1.03? I've examined some old v1.03 logs of mine and all four brake temperatures are in there.

    @Muzarati Thank you very much for sending me your files (and please excuse my late answer.) From the screenshot you provided I think the only issue is you were using a workbook made for Automobilista - I've just loaded your log file and it looked perfectly fine in my version of i2 Pro. Have in mind that it's best to create a separate workbook for each sim (starting from i2's built-in Circuit template workspace.)
     
    • Love it! Love it! x 1
    Last edited: Jan 19, 2023
  16. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    • Like Like x 1
  17. Ricardo Soares

    Ricardo Soares Member

    Joined:
    Dec 16, 2020
    Ratings:
    +5 / 0 / -0
    Is it compatible with Motec M1 Tune version?

    Regards.

    Ricardo V. Soares
     
  18. Thiersman

    Thiersman New Member

    Joined:
    Jun 4, 2021
    Ratings:
    +1 / 0 / -0
    Many Thanks for this little software. I wait this this since 10 years ago.:)

    +1
    I hope don't wait 10 years more for this sim :(
     
    • Agree Agree x 1
  19. KrisP

    KrisP Member

    Joined:
    Jan 8, 2022
    Ratings:
    +18 / 0 / -0
    No, it's for Motec i2. M1 is used for tuning electronic motor controllers (ECUs.)

    Thank you very much for the kind words!

    Regarding AMS2: as far as I understand it, like with Project Cars the update frequency of the telemetry in the game's shared memory section is tied to the frame-rate of the particular machine it runs on, which complicates matters because Motec i2 expects channels with a constant sample-rate. Also I don't play that game very much anymore.
     
    Last edited: Jul 23, 2023
  20. memoNo1

    memoNo1 Well-Known Member

    Joined:
    Dec 13, 2019
    Ratings:
    +155 / 0 / -0
    Hi
    Does anyone have a workspace for Motec that they can upload?
     
    Last edited: Aug 6, 2023