Telemetry SecondMonitor (Timing & status App)

Discussion in 'Community Workshop' started by Winzarten, Oct 26, 2017.

  1. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    Have you selected laps to display on the bottom laps selector?

    I will have a look to see what would it take to have the stints information in the excel reports ;)
     
  2. Wayne Whitmore

    Wayne Whitmore New Member

    Joined:
    Dec 12, 2019
    Ratings:
    +1 / 0 / -0
    While selecting laps to display then load all laps does show some data I don't see the control to open a different outing and when I use the icon in the second monitor app for open reports folder the folder is empty.
     
  3. viper4r3e

    viper4r3e New Member

    Joined:
    Dec 28, 2018
    Ratings:
    +2 / 0 / -0
    I think you have to differentiate between the telemetry window and the main app window.
    If you enable telemetry in the settings the app captures the data and you can load this data later again in the telemetry window of the app.
    But I think in the main window you can only see the report of the current session. You cannot load an older report in the app itself (@dev: please correct me if I am wrong ) .
    It is possible to enable the Export feature under Settings - > Report Options. Then after a session where you have the Export enabled, an Excel xlsx file is generated in the Report Folder, which you can open with Excel for example.
     
    • Agree Agree x 1
    Last edited: Dec 21, 2019
  4. Wayne Whitmore

    Wayne Whitmore New Member

    Joined:
    Dec 12, 2019
    Ratings:
    +1 / 0 / -0
    Thanks viper4r3e I am starting to understand. In the telemetry window what are the scrollable numbers in each lap reference box for?
    2nd monitor.JPG
     
  5. Thomas Jansen

    Thomas Jansen Sector3 Developer Beta tester

    Joined:
    Apr 5, 2018
    Ratings:
    +388 / 0 / -0
    Responsiveness is amazing since the latest update @Winzarten , awesome job :D
     
  6. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    Thank you :) The (un)responsivness of the UI was bugging me for some time, especially how long it took for it to start up. And I just couldn't figure out what was wrong, until recently. :D

    viper4r3e correctly answered the first question :)
    When you open telemetry viewer the last run session is opened automatically. You can open/add another session via the "folder" icons on botton left in the telemetry viewer. You can also add any lap telemetry file using the + button below the laps list. By default all telemetry data are stored in Documents\SecondMonitor\Telemetry\

    The numbers next to the laps is the lap group. Initially it is filled by stint (it is little bit crude right now, so one pitstop can advance the stint number by 2).
    It is used when you're openning charts from aggregated data (traction circle, suspension velocity histogram, etc). There you can choose how you would like to display the stints:

    SecondMonitor_2019-12-22_13-45-10.png

    You can either ignore the groups, and have data from all laps combined. Or you can have separate series for each group, so you can see within one graph the effects of some setup change. Or you can have separate chart window for each group.
     
  7. Cologne Racer

    Cologne Racer New Member

    Joined:
    Dec 7, 2019
    Ratings:
    +3 / 0 / -0
    Hi winzarten,

    I need some help. Unfortunately I am unable to connect to Assetto Corsa.
    RR worked immediately, but AC doesn't connect.
    What am I doing wrong? How do I integrate the plug in in AC?
    Apparently it won't be installed automatically.

    Thank you very much.

    greeting
     
  8. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    Hi
    First check if the SecondMonitor plugin present and enabled, in the AC launcher it is in Options -> More -> UI Modules.

    If it is not present here, then, for some reason, the automatic installation did not work.
    For manual install you need to copy the two .py files and the two directories (stdlib64, stdlib) from c:\Program Files (x86)\SecondMonitor\Connectors\AssettoCorsa\ (or from the directory you have the app installed)

    to where you have AC installed assettocorsa\apps\python\SecondMonitor\
    so it looks like:"
    TOTALCMD64_2020-01-01_10-19-12.png
    Then enable the plugin in the options.
    Just note the app will detect AC only when you're in race, this is because AC uses different executable for launcher and actual game. ;)
     
  9. Cologne Racer

    Cologne Racer New Member

    Joined:
    Dec 7, 2019
    Ratings:
    +3 / 0 / -0
    Hi Winzarten,

    thank you for your prompt reply.
    The app doesn't exist in AC, it probably lies
    that I have my games on a different hard drive than Steam itself. Stem on C and the Steam Libary on D.
    Therefore, the plug in must somehow be in the AC folder on D.

    Will try as you say.

    Thank you very much
     
  10. Cologne Racer

    Cologne Racer New Member

    Joined:
    Dec 7, 2019
    Ratings:
    +3 / 0 / -0
    Hi,

    it works!!! :) Thank you.

    I still have two questions. Do I have to set anything else to save my data?
    What do I have to do to see the telemetry data?

    Thank you very much
     
  11. Cologne Racer

    Cologne Racer New Member

    Joined:
    Dec 7, 2019
    Ratings:
    +3 / 0 / -0
    Ok, I have it!

    Thanks a lot
     
    • Wonderful Wonderful x 1
  12. TheStigM3

    TheStigM3 New Member

    Joined:
    Jan 3, 2020
    Ratings:
    +0 / 0 / -0
    Hey man, I just discovered this and want to say thank you! There was another telemetry app I was using that was a major resource hog and this one is well crafted!

    In the future do you think you would create any support to import csv files or custom data files for viewing and comparing lap times? Or is there a way I can create my own .lap/.plap data file with info so I can import for comparison? Doesn’t look like those files are text and possibly just binary?
     
  13. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    I am glad you're finding the application usefull :)

    Yes, the files are binaries (protobuf serialized), this to help the performance and to keep the file size relatively small. But the ability to export/import CSV files shouldn't be that big of a task, so I can implement it if there is use for it. ;)
     
  14. viper4r3e

    viper4r3e New Member

    Joined:
    Dec 28, 2018
    Ratings:
    +2 / 0 / -0
    Maybe a suggestion for showing gaps during a race.
    I don't know why the APIs are not providing it, because in the games this info is normally available. But it is what it is ;-)

    There is a relatively simple solution which I used for a webbased tool for pcars2 (https://github.com/eckhchri/pcars-ds-liveview/blob/master/README.md). It has some disadvantages, but it is working.
    I simply sum up the lap and sector times for every car and calculate the diffs between the cars. In the first step I used lap times only. The trigger is the lap counter for every car. In pcars2 this counter is available for every car, I don't know how it is in other sims.

    How it works:
    I check the lap counter for every car all the time. At race start the sum for every car is zero. If the lap counter increases by one for a car, which happens normally when crossing the Start/Finish line I add the current lap time to this sum.
    At the same moment I compare the lap counter between the current car and the cars on first place and ahead. If the number of laps is the same I calculate the time diff between the current car and the cars on first place and ahead with the sums.
    If the number of laps is different I show the lap counter diff.
    I reapeat this for all cars. Important: This is only working correct if the loop sequence runs through the positions of the cars. That means you have to begin with the car in 2nd pos (the first has no gap), then 2nd, then 3rd and so on.
    Only then the car ahead has already a new lap time.

    The disadvantages of this approach:
    1. The gaps are only updated once per lap. But the race position for example is updated all the time. That means if one car overtakes another your table is updated immediately, but the gap not until the car crosses the Start/Finish line.
    2. The app have to run during the complete race. If the race is running and you would start the app in lap four for example, it could not work, because the sums till lap 3 were missing.
    3. With every lap the chance of a wrong calculated gap can increase, because of a sum of rounded values. This depends on how the game calculates the times internally. The accuracy in motorsport is normally one millisecond. The question is how it is calculated and rounded in games.
    In pcars2 the physics engine runs with 600 Hz. That means a maximum possible accuracy of 1.67 milliseconds. Further I know that there was or is (cannot remember if it was fixed) a bug in pcars2 that laptimes between game and Dedicated Server API sometimes have a diff of one millisecond which is indicative of a rounding error.
    In worst case if the game calculates internally with higher accuracy but provides the times through API in milliseconds only, the following can happen:
    - game internally : 0.49 ms + 0.49 ms = 0.98 ms
    - rounded values in API: 0 ms + 0 ms = 0 ms
    That means the sum of two lap times generates a diff of nearly 1 ms.

    We have to accept the points 2 and 3, there is nothing we can do.
    For point 1 we can higher the update rate if we additional use the sector times, then you have an updated gap after each sector. With point 3 in mind you should not sum up sector times only and ignore the lap times. This would be also possible, but the chance of wrong calculated gap is 3 times higher, because of 3 times per lap.
    Instead you should use the sector times only for the current lap. That means after driving from sector 1 to 2 you add the current sector 1 time to the laptime sum and then later the sector 2 time to this sum again. But if you cross the Start/Finish line you add the new laptime to the original lap time sum without the sector times.

    There is a screenshot attached how it looks like in our tool for pcars 2 (I developed it together with a friend).

    If you want to see how the gaps are calculated in action:
    - Open the following site in Chrome Browser: http://www.christoph-eckhardt.de/pcarsdemo/pcars-ds-liveview/
    - Click the "Load from URL" button at the bottom grey window and select the file "PCARS2_rec_DS_MugelloShort_20LapRace.zip" for replaying this recorded session. This is the only recording where the calculation was already implemented.
    - Type "1000" in the "loop start pos" field at the bottom grey window, that is the position where the race starts. Or use the horizontal scroll bar.
    - Click the "Drivers" button in the top bar, which shows the driver table header.
    - Click the down arrow button on the right side of the table head to expand the table

    If you are interested in, here is the JS code I used for the gap calculation:
    https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L1309
    - till line 1357 is the calculation on lap count increase
    - and after it there is the code for the calculation with sector times
     

    Attached Files:

    • Like Like x 1
    • Love it! Love it! x 1
    Last edited: Jan 5, 2020
  15. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    I love the simplicity of that algorithm, clever :)

    But I feel it wont me allow me to do relative gaps (how many seconds ahead of you is the lapped car), which I would like to keep. :-/
    I will most likely divide the circuit to section of certain length (100m seams reasonable), and for each driver keep the time the car was present in each sector. Then I can quickly calculate the relative gap just by substracting the times. It will also work for absolute gap up to one lap, but then I can just use the total distance traveled, which I am already computing to get how many laps ahead/behind the car is.

    In the mean time, I've pushed version 6.1
    One of noteworthy addition is the ability to disable updating of some of the most frequently updated information, in the settings.
    SecondMonitor_2020-01-06_11-15-42.png

    As a fresh Rift S owner I found out just how CPU bound R3E is in VR (my older 6600K is really starting to struggle), disabling this information (most of them not really needed in VR) allowed me lower the CPU usage of the app by few %.
     
    • Agree Agree x 1
  16. viper4r3e

    viper4r3e New Member

    Joined:
    Dec 28, 2018
    Ratings:
    +2 / 0 / -0
    OK, in this case my way is not usable.
    But I think for the end result after race the gaps could be interesting, too.
    If you have another way, good. I only want to say that it would be nice to have it.
     
    Last edited: Jan 6, 2020
  17. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    Yes, for the end results it is really perfect. It never occured to me that all it takes is to sum the lap times. :)
    Thanks for the idea ;)
     
    • Like Like x 1
  18. Wayne Whitmore

    Wayne Whitmore New Member

    Joined:
    Dec 12, 2019
    Ratings:
    +1 / 0 / -0
    I have just installed the most recent version 6.1.0.431 (auto install) but have lost connectivity to automobilista. With the game running AMS appears in the lower left corner of the window ( so I assume it is connected) & I have ticked enable telemetry in the settings. What have I missed. Previous version was all good.
    Crew chief is working fine.
     

    Attached Files:

    Last edited: Jan 8, 2020
  19. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 15, 2016
    Ratings:
    +262 / 0 / -0
    Thanks for the report, I think I know what the issue is.
    A new version should be up in a few minutes ;)
     
  20. Wayne Whitmore

    Wayne Whitmore New Member

    Joined:
    Dec 12, 2019
    Ratings:
    +1 / 0 / -0
    Yep fixed now thanks.