[REL] rFactor2 Log Analyzer ver. 2. With offline and league Championship Manager

Discussion in 'Other' started by Nibo, Apr 15, 2015.

  1. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    Nice job, Nibo :)
     
  2. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    getting error in new version when I click on the following result in the results viewer ==> View attachment 16463

    Something went wrong...

    2015_04_20_23_20_25-81R1.xml
    Traceback (most recent call last):
    File "D:/web2py/applications/r2la\compiled\controllers.default.report.py", line 60, in report
    File "D:/web2py/applications/r2la\compiled\models.my_model.py", line 237, in create_event
    File "D:/web2py/applications/r2la/modules\mad.py", line 117, in calculateAll
    File "D:/web2py/applications/r2la/modules\mad.py", line 213, in calculateRaceResultsTable
    File "D:/web2py/applications/r2la/modules\mad.py", line 1725, in sectostr
    OverflowError: Python int too large to convert to C long
     
  3. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    <FinishTime>-340282346638528860000000000000000000000.0000</FinishTime>
    What the hell? :D Fixed parser.
    Also found that I made a stupid mistake of opening some errors in new page. If such log was first in list, than you never see the list... So moved all errors to lower panel.

    https://www.mediafire.com/?p9lv5mh6n7m3x2v
    2.021:
    fix for FinishTime = -340282346638528860000000000000000000000.0000
    error messages that redirected to new page now appear in lower panel
     
  4. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    Whoa I didn't know I was that fast :p Thanks for fix! :D
     
  5. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    Just dropping in to say tool is working great and thanks again. For me, this tool is the UI for rFactor 2 and the rFactor 2 UI is just to change race settings and start the race. But ALL of the meaningful stuff is right here in your tool. :D
     
  6. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    1
    Hi Nibo,

    Some feedback for you:
    3800 results files and each time I remove a selected item that is unable to be read, there is about a minutes delay as the xmls are all re-read. Being able to ctrl click multiple items would be nice, or a manual refresh only option?
    Remove files with no time set did not move them, so I guess it gets halfway through reading before encountering the problem. Let me know if you'd like to see them.

    I'd personally like to see a dedicated db and even have it hosted online to allow statistics to be compared with others, however I understand scope creep and there are others already looking in this space.

    I think it is screaming for more stats, it may be something you have in mind already?
    On the track pages:
    total laps/time/km driven
    Best car/worse car
    Laps driven per car...

    even a profile page about me:
    Favourite circuit
    races won
    podiums....

    unlock achievements... :D alright alright, enough lol.
     
  7. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    How are the consistency numbers calculated? Sorry if this is found somewhere as I forgot to ask when I was at my computer.
     
  8. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    matf1, wow 3800 logs... I didn`t think it may be so many. I had around 800 and now its 300 after removing empty logs.
    If you have many unreadable logs with errors that you want to delete, as a quick-fix I can split "remove" action to two buttons "Remove log and refresh", "Remove log, no refresh". So you can press latter button many times quick. And then manually refresh db.
    But if unreadable logs are not ancient, and from last rF2 builds, then it will be better to upload them for me, so that I could patch parser for whatever reasons they are not loading.

    About not removing logs with no time, yes, I want to see them. But if there is error in this process, then to reproduce it I must have all logs from your Results folder (you can send them all in archive if you don`t mind). Did it not remove any empty logs? If it moved some, then there must be folder UserData\Log\Results\temp\no_time_set with moved logs.

    Theoretically there could be online server to which users can upload their stats from r2la. But I have no money for hosting/domain, and honestly I don`t think I will be able to maintain it. At least in near future.

    More stats per track are possible. But it can increase loading times on refresh. Will think about that. May be first I`ll try to refactor/rewrite some old code to speed up everything and enable future expansion of features.

    P.S.R.,
    Average deviation from drivers fastest lap - calculates arithmetic mean for (lap_time-driver_fastest_lap_time) values for all laps except 1st lap, fastest lap, pit-laps and laps that are longer then driver_fastest_lap*2 (i.e. laps where you had major off or stopped somewhere).
    Average deviation from fastest lap of the race - is the same, only for overall fastest lap of the race.
     
  9. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    1
    Sorry, I could have been clearer. I had 7900 odd to begin with and clearing no timers reduced that to 3800.
    The ones that had an error being read were not moved in that process, so that's when I started doing them one by one.
    Bad results files


    Regarding the cleanup... I'm all good on that front as explorer still works well, so pencil it on for a future update maybe.
    Maybe I should just stop hoarding ;)

    If you can make the arse as nice as the face, it will be a winner i'm sure.
     
  10. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1


    Excellent. Makes perfect sense. Thanks for explaining :)

    Some observations after a little more use...

    ==> Highlighting my name under "Race Best Sectors" would be nice (like I said, very nitpicky...)

    ==> If "Gap behind leader`s avg laptime" is actually what it says, it would also be great to have "Gap behind leader" so can see where am closing "physical" gaps in race

    Thanks again :)

    PS - And I set (another) new PB today using this tool :D:D:D:D:D
     
    Last edited by a moderator: Apr 25, 2015
  11. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    But it does show exactly that - gaps behind leader on every lap. I just named it literally after calculation method. May be I should just name it "Gaps behind leader".
     
  12. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    rFactor2 Log Analyzer ver. 2

    Ah I think I get it so gap calculated = my average lap time * number of laps minus leader's average lap time * number of laps ?

    No that can't be right because would just use total time. Nevermind I'm confused....
     
  13. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    Code:
    driver_gap_to_leader = 0
    for lap in driver_race_laps:
        driver_gap_to_leader = driver_gap_to_leader + (race_leader_average_lap_time - drivers_laptime_on_current_lap)
    
    Yeah, name of the graph is misleading. Should be "Gaps behind leader".
     
  14. argo0

    argo0 Registered

    Joined:
    Jan 22, 2012
    Messages:
    624
    Likes Received:
    8
    This is great, thanks for sharing your hard work
     
  15. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    Not sure about this math. Haven't had time to work out an example to prove it, but doesn't look right. For example, how can the leader be behind himself?

    View attachment 16506

    See also same file race gaps here ==> link
     
  16. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    I had version that you show in first versions of my graphs. Then I changed to current view and I like it more.
    Because simple gaps behind leader will not look good if leader changes or goes to pitstop. Current formula instead shows any number of leaders through the race correctly and pitstops also.

    Here is comparison between simresults and my version for the same race log:
    View attachment 16508 View attachment 16507

    On my graph you can clearly see leader pitting 2 times and all gaps.

    I agree however, that some times my gap graph need better scaling. I will look into it, may be make it prettier.
     
  17. P.S.R.

    P.S.R. Registered

    Joined:
    Jun 15, 2014
    Messages:
    1,795
    Likes Received:
    1
    Ah brilliant thanks for explanation :)
     
  18. Nibo

    Nibo Member

    Joined:
    Oct 12, 2010
    Messages:
    1,667
    Likes Received:
    493
    https://www.mediafire.com/?79n78763naw9y7k
    v 2.025:
    Using fast lxml library for parsing now
    Added "Select multiple" button, to show checkboxes, select multiple logs and then delete them
    More fixes for faulty .xml files (empty "Lap" tags, invalid character`s, "junk" symbols at the end of the file)
    Track overall laps, distance, time stats added to track page
    User name at the "Best Sectors" pages now highlighted
    Optimizations to speed-up loading "Results viewer" page
     
  19. Lgel

    Lgel Registered

    Joined:
    Jun 24, 2014
    Messages:
    1,210
    Likes Received:
    286
    Thanks for this very improved version.
     
  20. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    1
    Awesome, thanks Nibo!

    Sent from my Nexus 4 using Tapatalk
     

Share This Page