Determining Steered Angle from Telemetry

Discussion in 'Automobilista 2 - General Discussion' started by GeekyDeaks, Apr 4, 2023.

  1. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    Check my message before yours
     
    • Like Like x 1
  2. Wayne Whitmore

    Wayne Whitmore Active Member AMS2 Club Member

    Joined:
    Apr 26, 2017
    Messages:
    379
    Likes Received:
    98
    The app is waiting for AMS2 to start but after starting AMS 2 and doing several laps in a test day the apps is still sitting at waiting for AMS2 to start. Is there specific settings in AMS 2 that must be set up for the app to see the game.
     
  3. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    Shared memory IIRC
     
  4. Djangopass

    Djangopass Formula Vintage cars

    Joined:
    Jan 23, 2024
    Messages:
    29
    Likes Received:
    7
    Thanks a lot
     
    • Like Like x 1
  5. viper4r

    viper4r Active Member AMS2 Club Member

    Joined:
    Mar 5, 2020
    Messages:
    148
    Likes Received:
    55
    Is this the correct question?
    If you want to use MoTeC, the question should be: what channels are provided by the sim-to-motec logger. Or am I wrong?

    EDIT:
    The info what channels sim-to-motec provides can be found here:
    sim-to-motec/stm/ams2/logger.py at main · GeekyDeaks/sim-to-motec
     
    Last edited: Jan 31, 2024
    • Agree Agree x 1
  6. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    641
    Likes Received:
    203
    No offense, but did you clicked here?
     

    Attached Files:

  7. Wayne Whitmore

    Wayne Whitmore Active Member AMS2 Club Member

    Joined:
    Apr 26, 2017
    Messages:
    379
    Likes Received:
    98
    HI no offence taken, yes clicked start. Restarted both the app and the game several times to test after clicking the start button in the app, but it always stayed with the message that says waiting for AMS2.
    I have systems set to Project Cars 2 for shared memory
     
    Last edited: Feb 1, 2024
  8. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    Where did you press “start program”? It has issues when starting it in certain ways
     
  9. Wayne Whitmore

    Wayne Whitmore Active Member AMS2 Club Member

    Joined:
    Apr 26, 2017
    Messages:
    379
    Likes Received:
    98
    The processes I have tried are :
    1. Start the app press start then go start AMS 2 then do several laps
    2. Start the App, start AMS 2 go to pits, go to the APP click start then go back to the game and complete some laps
    3. Start AMS 2 , go to pit, Start the APP click start, then return to the game and complete some laps.
     
  10. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    Do you press the logo or search for it on Windows? Also try enabling UDP
     
  11. Wayne Whitmore

    Wayne Whitmore Active Member AMS2 Club Member

    Joined:
    Apr 26, 2017
    Messages:
    379
    Likes Received:
    98
    UDP frequency is set to 1 and UDP protocol is set to PCARS 2.
    The executable for the APP is saved to my desktop where its icon shows. I use the icon to start the APP.

    EDIT - No idea what is different, but the APP is now working Thanks for the help.
     
    Last edited: Feb 1, 2024
  12. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    I’ve also had these odd issues, but I think @GeekyDeaks was going to have a look at it
     
  13. GeekyDeaks

    GeekyDeaks Member AMS2 Club Member

    Joined:
    Jan 17, 2022
    Messages:
    83
    Likes Received:
    47
    I really should probably update the README with the settings..... There should be no need to enable UDP as the app reads only from the shared memory, but that is assuming there is not some quirk with the logic for the shared memory and UDP telemetry. I'll take a screenshot of my settings for reference and do a little bit of testing when I am on next.

    I have not yet seen an instance where the app cannot see the shared memory file once AMS2 starts, but I'll keep an eye out for it in future. The way the python package utility operates does give other quirks though and gets a bit confused if the path it's run from has 'interesting' characters or is associated with cloud sync etc...
     
  14. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    641
    Likes Received:
    203
    No one can do better advice than @GeekyDeaks and this is just a happy user testimony.

    I do have some obstacles runnings AMS2_logger for the first time in older versions, don't know what I did wrong but once overcoming it works like a charm.

    What works for me:
    1. App location: Althoug could be run from any you create directory, I only succed by running from the Desktop and after the app created the config file (ams2.cfg) and create logs/ams2 folders.
    2. Start order: Run app first and click Start; Launch AMS2 and complete some laps; Optionally run some stints; Click the Stop button; Cicle how many start/stop you wish; Click Quit to end session.
    3. You don't need to run MoTeC at the same time, it's up to you.
     
    • Agree Agree x 2
  15. Commandant Lassard

    Commandant Lassard Active Member AMS2 Club Member

    Joined:
    Mar 20, 2021
    Messages:
    188
    Likes Received:
    196
    New user here, great project. I have it working but no steering data. I saw your video racing legend the comments section you mentioned changing some units. Where can I find the units to change?
     
  16. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,493
    Likes Received:
    1,881
    It’s in percent since the value changes when changing car if not on percent. To turn it into degrees of radians, make an equation which takes the percentage times the max turn angle of the car
     
  17. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    641
    Likes Received:
    203
    Moreover since Steering Pos goes from -100 to 100 (zero included):
    Steering Wheel Pos = 'Steering Pos' [%]/100 * 'Steering Lock' [deg]/2
    and
    ('Steering Pos' [%]/100 * 'Steering Lock' [deg]/2) / 'Steering Ratio) to obtain wheel angle (at front axle)
     
    • Like Like x 1
  18. Wayne Whitmore

    Wayne Whitmore Active Member AMS2 Club Member

    Joined:
    Apr 26, 2017
    Messages:
    379
    Likes Received:
    98
    Are the wheel speeds not shared from the game.
    upload_2024-2-4_21-43-17.png
     
  19. GeekyDeaks

    GeekyDeaks Member AMS2 Club Member

    Joined:
    Jan 17, 2022
    Messages:
    83
    Likes Received:
    47
    They should be, but I don't recall the name having the 'Rel' prefix. Just look for 'Wheel Speed'
     
    • Agree Agree x 1
  20. newtonpg

    newtonpg Active Member AMS2 Club Member

    Joined:
    Dec 29, 2018
    Messages:
    641
    Likes Received:
    203
    Tangential speed? No, as reported by your dirve path:
    ..\Automobilista 2\Support\SharedMemory\AMS2_SharedMemoryExampleApp\SharedMemory.h

    But you have tyre rotational speed rps in rad/sec
    and tyre diameter using SimHub (preferebly running viper's plugin with all AMS2 tyre diameters included), SecondMonitor, Coanda's car info spreadsheet or even my own google spreadsheet (ask for permission)

    Also, are you using @Racinglegend1234 workspace distributed along sim-to-motec 1.6.0?
     

Share This Page