Data connector for rf2 - can anybody give me some insights

Discussion in 'Technical & Support' started by TheBigO, Mar 29, 2021.

  1. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Hi,

    I just registered on the forum. I came here with some need for help, but I would bring something big in return.

    I've written a quite big software package for complex simulation rigs. With this software you can control almost all aspects and 3rd party software, that we are using in our beloved virtual world. All aspects can be controlled from hardware controllers like Button Boxes, and everything can be freely configured using graphical tools.

    Part of the package is a virtual racing engineer, which is a fully voice chat capable artificial intelligence. It can give you a lot of information about your race (much like crew chief), but is also capable to completely and
    autonomously prepare and conduct a pitstop (not much like crew chief), thereby fully relieving you from calculating and input the required settings. It can handle weather conditions, damages, and everything that can happen during a long race. Currently there exists an integration for ACC and now I am plannig to integrate with rf2 as well. And here is my question: Does anybody is willing to share some source code for a data integration to give me some kind of jump start? I am completely new to rf2.

    In return, I will share the rf2 integration of the virtual race engineer with you all. The package is free, open source, and hosted on GitHub. It can can handle rf2 already as part of the general simulation control, but no race engineeer yet.

    Here is a link to the general software: https://github.com/SeriousOldMan/Simulator-Controller
    Full doumentation: https://github.com/SeriousOldMan/Simulator-Controller/wiki

    And this is a short description of the required data (telemetry) integration: https://github.com/SeriousOldMan/Si...i/Virtual-Race-Engineer#telemetry-integration

    Thanks a lot in advance

    Oliver (TheBigO)
     
    Last edited: Mar 29, 2021
  2. Bill Worrel

    Bill Worrel Registered

    Joined:
    May 1, 2019
    Messages:
    186
    Likes Received:
    106
  3. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Thanks a lot. Will take a look...
     
  4. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    60
    Likes Received:
    24
    Hi TheBigO.
    I have developed a virtual engineer for my league in vb.net.
    I could solve some doubts for you.
    Ask, and as far as I can, I will help you.
     
  5. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Hi and thanks. I figured a lot on my own alreday, but indeed two questions remain.

    1. Is there any way to get information about upcoming weather changes? I understand, that weather may be controlled by upoming plugins and I suspect, that it may have soemthing to do with the transitions, but I do not understand the concepts without documentation.
    2. In what field is the remaining race time stored. I tested "scoring.mScoringInfo.mEndET" but it is a quite large negative number...
     
  6. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    60
    Likes Received:
    24
    First of all, I'm no expert, but I can give you opinions.

    1) From what I have seen, in rF2ScoringInfo, you find the current weather conditions.
    I have not found information on total session conditions in any structure.
    With rF2WeatherControlInfo you can change the weather by calling the API.

    2) Racing can be done by laps, time, laps + time....
    It is likely that, if the race is by laps, that variable does not contain a valid value.
     
  7. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Thanks again, regading the race time, your hint helped and everything is up and running. Sadly, looks like there is no solution for upcoming weather changes. But for a first version, I am quite happy. Will be released next Friday...
     
  8. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    60
    Likes Received:
    24
    Glad to help.
     
  9. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Ok, here is the result:

    ------------------------------------------------------------------------------
    Release 2.8 is online and brings many new features again:

    1. Support for rFactor 2 and other simulations has been expanded and the virtual race engineer is now also available in these simulations.
    2. A new plugin "Race Engineer" takes over the control of Jona over the individual simulations.
    3. Jona now also supports Practice and Qualification sessions, but a pit stop is only controlled in the race.
    4. The settings (=> "Race Engineer Settings") for Jona can now be changed during a running session and Jona reacts to them.
    5. For dry tyres, different compounds are now recognized according to color coding (red, white, blue).
    6. This time there are also some new features for developers:
    a. The documentation for the plugin interface of the configuration tool is ready.
    b. The build pipeline in "Simulator Tools" now also integrates the build process of Visual Studio.
    c. A new class "JSON" allows working with JSON files.​
    ------------------------------------------------------------------------------
     
  10. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    60
    Likes Received:
    24
    Hi @TheBigO, this week we have been running in rainy weather and I have been looking at the weather.

    I remembered that in rF1 I had a weather script generator and generated the weather forecast.
    Have a look at the <xxxx>s.wet files that are created in the track folder.
    By default rF2 creates five weather checkpoints, but you can create more.
    Each checkpoint has other data associated with it: when the weather change is initiated, how long it will be active, clouds, chance of rain, rain intensity...etc.
    You can retrieve this data and generate a weather forecast.

    Obviously this works as long as the weather is controlled by script, it does not work for plugin-generated weather.

    I hope it is of some use to you.
     
  11. TheBigO

    TheBigO Registered

    Joined:
    Mar 29, 2021
    Messages:
    15
    Likes Received:
    18
    Hey, thanks. I will take a look at that. Currently, I am very busy with the setup database for the virtual race engineer, but I put it on top of the backlog.
     

Share This Page