Simresults.net - a webbased result reader & PHP library

Discussion in 'Other' started by mauserrifle, Jun 2, 2013.

  1. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    32
    Our endurance league has finally resumed after a long break as we waited for rF2 to mature. So now we are looking at using Simresults for our results. We do multiclass racing. Is there any chance you could add classes to the results? Maybe even class colors and fastest lap by class. Also, could we get the ability to add a logo to the results and maybe a URL linking back to our webpage. The logo could simply be linked to so you are hosting images for everyone and their brother.

    Thanks again for your work on this!
     
  2. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Hi Noel,

    Classes are parsed already, they are now just shown within the "friendly" vehicle name with name, type and class. So little change for that.

    Fastest lap by class can be done too. No problem. Any color to suggest? ;)

    What location you would like the logo? It's possible, either by hosting the images for you, but that means I'll have to re-do work for every league. Making it dynamic through URL manipulation would be possible too, but I'll have to see which is most safe to prevent XSS (yes I can be a security freak at times).

    I'll pick it up soon :)
     
  3. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Good news for you endurance racers :cool:

    First update is online. I think this version is even better than colors or whatever. Results that contain multiple classes will have the button "Results by class". Simresults will just split the result into multiple! So this means you'll have ALL features for each class subset from an endurance race!!

    Example here:
    http://simresults.net/130610-rz8

    Library code is pushed to develop branch at github:
    https://github.com/mauserrifle/simresults/commit/8a966ff069c4bc0acbde258b010d99d6e3fe1631

    Please provide me with feedback!
     
  4. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Last edited by a moderator: Mar 29, 2014
  5. Jimmi Allison

    Jimmi Allison Administrator Staff Member

    Joined:
    Apr 2, 2011
    Messages:
    971
    Likes Received:
    870
    The league Noel is talking about is also the league im representing. I would prefer the class color.
    Our current classes are
    P1 (red)
    GT (orange)
    However - its not as important as the actual results - if it could state P1 and GT that would be perfect, like our old result system
    http://virtualendurance.net/ResultsSystem/s6/s6pre.htm#raceResults

    Your system is however fast and clean - unlike ours which is real heavy.

    Edit: also, what I think would be better, since it is team related is to switch around the driver/team colums. This is ofcause only relevant to endurance racing - since most sprint races are 1 driver only.
     
  6. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Jimmi,

    I don't have any good way to detect endurance or non-endurance results. I also would like a user in control of how columns are shown. I eventually should make some options but I have very limited time lately.

    I made a temporary solution along with the previous changes. You can pass the query param ?team=1 to the URL which changes the columns to class, team, vehicle and driver.

    Example:
    http://simresults.net/130610-rz8?team=1

    Let me know if this works for you.

    Regarding the colors, I might implement that lateron along with this 'team' view. But I hope you have enough with the current view due to limited time :eek:
     
  7. Jimmi Allison

    Jimmi Allison Administrator Staff Member

    Joined:
    Apr 2, 2011
    Messages:
    971
    Likes Received:
    870
    It works.
    Does the class files come from the .veh file OR the upgrade, since our classes for example in GT3 is (997-GT3, F458-GT3) etc.
    Looks really good - close to moving 5 previous seasons there :)
     
  8. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Good :)

    I read class info from the XML tag:
    <CarClass>LolaT280</CarClass>

    So no idea, depends on how rfactor 2 logs it.
     
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    32
    To answer this Jimmi, the results files use the display class override from the upgrades.ini so our classes will be consolidated to GT3 like we want.
     
  10. Jimmi Allison

    Jimmi Allison Administrator Staff Member

    Joined:
    Apr 2, 2011
    Messages:
    971
    Likes Received:
    870
    :D
    So if we want to use team=1 what code should we use to also include a logo?
     
  11. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Jimmi,

    Add any additional parameter with a & sign. So for example:
    ?team=1&logo=LOGO_URL&league=LEAGUE.NAME
     
  12. Jimmi Allison

    Jimmi Allison Administrator Staff Member

    Joined:
    Apr 2, 2011
    Messages:
    971
    Likes Received:
    870
    Sounds good - however now our race is over and im trying to upload a 5.4 mb file and it keeps telling me "something went very wrong" - perhaps the file is too big?

    Our server crashed - (4gb limit - wonder when ISI is gonna make a 64bit version), so what i would like to request is that i can add laps "as penalties" perhaps - that would make it perfect.
     
  13. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Ye I got a error message in my mail that max execution time got exceeded. Can you send me the file please?

    What you mean by laps as penalties? Someone drove 10 laps and gets 2 lap penalty, thus 8 in the end?
     
  14. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Library has been updated to v0.3.0:
    https://github.com/mauserrifle/simresults/releases/tag/v0.3.0

    Changes:

    * Assetto Corsa support (still WIP but seems stable enough for release)
    * Split session by vehicle class
    * Team name support
    * Fixed regular expression errors on forward slashes when calling `getFriendlyName()` methods

    What does this mean for you as a simresults.net user? Not much new really. But last change above was due to three error mails I received by the software. So if you encountered an error last couple days, try again please!
     
  15. Valter Cardoso

    Valter Cardoso Registered

    Joined:
    Nov 4, 2011
    Messages:
    601
    Likes Received:
    1
    We´ve been having some difficulties uploading results to simresults, specialy in historix logs.
    Tuesday i tried uploading one of the race logs and was unable. Tried today the same log and all went fine.
    Thks.
     
  16. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    Aha, then the error mails were from you then. "Rouen-Les-Essarts 1974/94 1.01"? That little slash caused it :eek: So it's fixed now! :)
     
  17. CordellCahill

    CordellCahill Registered

    Joined:
    Oct 14, 2010
    Messages:
    190
    Likes Received:
    0
    PM sent mauserrifle
     
  18. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    CordellCahill has put me on steam to work on some extra small updates :)

    Library has been updated to v0.3.1:
    https://github.com/mauserrifle/simresults/releases/tag/v0.3.1

    If you're planning to use the library. Please install through composer. The simresults package can be found here:
    https://packagist.org/packages/mauserrifle/simresults

    For help see the homepage:
    https://packagist.org

    When you download through the zip on github, you won't benefit from using the library as a composer package (composer autoloads the classes etc). I'll write installation instructions soon on the website for this.

    Changes v0.3.1:

    * Added fuel support
    * Added pitstop marking per lap

    What does this mean for you as a simresults.net user? You can see per lap whether someone has pitted and how much fuel there was left this lap.

    For now I think everything of rFactor XML's is parsed!! Thanks everybody for your interest in the website and library. If you have some good ideas that could maybe be implemented and part of simresults, let me know. Also let me know if you know any other sims that produce log files.

    Have fun!
     
  19. mauserrifle

    mauserrifle Registered

    Joined:
    Feb 26, 2013
    Messages:
    382
    Likes Received:
    3
    http://simresults.net has been updated!

    It now shows pit stop times within the laps overview of a result. Example result:
    http://simresults.net/140723-x5J

    Note that rFactor does not include pit times in the logs, so it is calculated using sector 3 and sector 1 MINUS the averages of all non-pitstop sector times. So not exactly 'right', but should give a clear indication how long someone pitted.

    The library has been updated to version v0.4.0. It includes two updates requested by CordellCahill:

    * Get pit time of a lap
    * Added `dedicated` field to the `Server` class

    And more:

    * Better installation instructions in README
    * Added Travis CI. Simresults is now tested against the following PHP versions:

    - 5.3
    - 5.4
    - 5.5
    - 5.6
    - hhvm

    All tests pass. This means I can guarantee and prove the library works on all modern PHP versions! https://travis-ci.org/mauserrifle/simresults

    For anyone interested in details how the pit stop times are implemented. See the following spreadsheet I used to create my tests:
    https://github.com/mauserrifle/simr...ocs/RfactorReaderTest_testReadingPitTimes.ods

    And for the code, the following PHP commit:
    https://github.com/mauserrifle/simresults/commit/21e96f9df6c20712aef4709ec014eebbe6d74eb6

    Installation instructions
    https://github.com/mauserrifle/simresults/blob/develop/README.md#installation-and-example

    Have fun!
     
  20. Seahawks1Fan

    Seahawks1Fan Registered

    Joined:
    Dec 14, 2011
    Messages:
    29
    Likes Received:
    0
    Great update. I really like the layout and will definitely be using this for our upcoming season.
    Thank you!
     

Share This Page