1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AMS2 Telemetry CSV Writer

Discussion in 'Automobilista 2 - General Discussion' started by TechAde, Feb 19, 2021.

  1. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    Hi guys,

    I've written a little Windows app based on the pCars2 shared memory SDK that dumps telemetry data out to CSV. Any application that can open CSV files can then be used for analysis, from Excel to ATLAS.

    There's a readme included with a little more info, grab the zip below.

    Just extract the exe where you want, run it, then when on-track in AMS a CSV will automatically be written. To close the file hit ESC to close the app.

    What I really wanted this for was to get at FFB data but unfortunately there doesn't appear to be anything relevant available via the API, so I thought I'd turn it into something that might be useful for somebody.

    Example output:
    upload_2021-2-19_11-42-11.png

    Feedback appreciated!

    Cheers,

    TechAde
     

    Attached Files:

    Last edited: Feb 19, 2021
    • Like Like x 5
    • Useful Useful x 2
    • Winner Winner x 1
  2. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    Thank you very much!

    While I don't know anything about API, as a SimHub user I know that SharedMemory and UDP dosen't share (integraly) the same telemetry data values (or variables?). Probably you know that.

    PS: I just remember you as very active member at rF2 community, am I right? Welcome!
     
  3. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    I didn't know that, thanks for the tip! I'll take a look at what might be different in the UDP stream. [Edit: Not a lot at first glance, all I can see is SuspensionRideHeight that isn't there in the shared memory stream]
    You have a good memory! Thanks :)
     
    Last edited: Feb 19, 2021
  4. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    Here's an ATLAS workbook that I think displays most of the data.

    ATLAS_AMS2Workbook.png
     

    Attached Files:

  5. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    I suppose there's a free version of ATLAS but I don't have it here where I am.
    Could you please verify if I-M-O tyre temps values are passed correctly as in the game telemetry hud? and also if those temp numbers are integers?
     
  6. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    If they are then they're called something different.

    We have TyreCarcassTemp, TyreInternalAirTemp, TyreLayerTemp, TyreRimTemp, TyreTemp and Tyre TreadTemp.

    Here's a few laps of data for the front left:
    upload_2021-2-19_14-36-27.png

    According to the header units are all Kelvin and they're floats, not integers.
     
  7. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    Thank you!
    Yes, some temps are in Kelvin but those more often used are in Celsius (as in your graph).
    Strangely Tyre Temps passed by SimHub are all integers (even those in Kelvin) and that is a problem if using I-M-O temps to estimate ideal tyre pressure / contact path or delta I-O.
     
    Last edited: Feb 20, 2021
  8. BrunoB

    BrunoB TT mode tifosi BANNED

    Joined:
    Jun 13, 2020
    Messages:
    2,582
    Likes Received:
    650
    Hey @TechAde
    Good initiative :)

    But would it be possible to persuade you to create a "converter" app that convert the AMS2 telemetry output to a MoteC input format?
    Just like as example the DAMPlugin does for rF2?
    And other "converter" apps does for iRacing, AC and others.

    Hehe I would even be ready to pay a fee for this.:D

    ByTheWay: There can be downloaded a free version of the MoTeC_i2 pro. Absolutely the best professional telemetry tool (IMO).:cool:
     
  9. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    No, sorry, I don't have time to take on something like this - and I believe the legality of doing so is also dubious. I had a quick look to see if importing CSV files would work with Motec but it appears that requires a licence and can't be done with the free version. I could make the app write a Motec-compatible CSV easily enough, but it wouldn't be any good to anybody using the free version so would probably be a waste of time.
     
    • Friendly Friendly x 1
  10. BrunoB

    BrunoB TT mode tifosi BANNED

    Joined:
    Jun 13, 2020
    Messages:
    2,582
    Likes Received:
    650
    Thanks for answering.
    You are right about the csv - that would be waste of time. Because the free MoteC doesnt support it.

    Your "and I believe the legality of doing so is also dubious" is probably formally correct - but in practice un-correct.;)

    I have researched a bit in this issue and both the converter progs for iRacing and rF2 have no formally MoteC licence.
    But its completely obvious that the MoteC company knows these progs exists and is widely used.

    But MoteC have decided that its much smarter to get a lot of free positive publicity - than get a lot of bad publicity and no economic revenue by starting some kind of lawsuits against the converter programmers.;)

    ByTheWay: I guess that its only if the Official game company integrate a converter or as ACC does output telemetry directly in the MoteC format that they would need a licence and a formally Motec approval.:cool:
     
  11. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    Sure, it's more the time it would take me given the fact that I don't think there is any documentation on the file format, so I'd have to reverse engineer everything. This app to dump the telemetry to CSV is literally a few lines of code, it only took a few minutes. I've already spent more time responding to forum posts about it than I did coding it! :D
     
  12. BrunoB

    BrunoB TT mode tifosi BANNED

    Joined:
    Jun 13, 2020
    Messages:
    2,582
    Likes Received:
    650
    Hehe sorry - I feel partly guilty in this.:D
    But the reason Im so very interrested is that I know from iRacing and rF2 how extremely competent (and easy to use) the real MoteC telemetry is.
    But I understand (ofcourse) that you dont want to mess with the MoteC format.;)

    ByTheWay: Hehe to maybe tease you a tiny bit then it was the guy @Lazza from the rF2 forum who obviously had no problems getting enough info about the MoteC format to be able to offer his free converter proggy.
    Hehe just saying :p
     
  13. TechAde

    TechAde New Member

    Joined:
    Apr 18, 2020
    Messages:
    29
    Likes Received:
    8
    How about... you convince @Lazza to give me his rF2 plugin code and I'll have a go at making it work with my app? :)
     
    • Creative Creative x 1
  14. BrunoB

    BrunoB TT mode tifosi BANNED

    Joined:
    Jun 13, 2020
    Messages:
    2,582
    Likes Received:
    650
    Hehe I will honestly think about it.
    But I think too that I more or less 100% know his answer.:D
     
  15. ToMythTo

    ToMythTo The Hero We Need But Not Deserved

    Joined:
    Aug 31, 2020
    Messages:
    273
    Likes Received:
    78
    Much appreciated work. Just curious;
    Can we obtain:
    • Tire diameters,
    • Wheelbase
    • front track length
    of any car from UDP or SM ? Or they are already in the CSV?
     
  16. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    Just about Tire Diameter, you can use SecondMonitor.

    And I suppose these parameters are related to the physics definition files not the telemetry.
    Let's wait what TechAde will say.
     
  17. Nolive721

    Nolive721 Active Member

    Joined:
    May 17, 2020
    Messages:
    440
    Likes Received:
    127
    That’s great tool

    would be fantastic to have such addition of FFB output recording but as you said it seems not possible


    Might be worth asking the guys on the Custom FFB thread though just in case
     
  18. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    Yes and also ask to Wotever (SimHub developer) about their Thrustmaster (in my install) plugin.
     
  19. Nolive721

    Nolive721 Active Member

    Joined:
    May 17, 2020
    Messages:
    440
    Likes Received:
    127
    I confess I didn’t switch on Simhub on my rig this year

    for whatever reason been lazxy to fire up the 3mini amps driving my 6 bass shakers

    does simhub output FFB natively now? I remember having created a dashboard with FFB output for RF2 but didn’t check what simhub added as feature recently
     
    Last edited: Mar 7, 2021
  20. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    542
    Likes Received:
    180
    Ops and sorry to be late.
    I'll be at home next weekend, no one rig where I am.
     

Share This Page