[REL] rFactor2 Weather Tool

Discussion in 'Other' started by Gerald Jacobson, Mar 30, 2013.

  1. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,374
    Likes Received:
    31
    Thx good info :)
     
  2. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,374
    Likes Received:
    31
    My fault Gerald :p the hint from McFlex is a answer to my speculation about how the widget could be presented if the d3d9.dll is already used by another plugin. But as I said it was only a speculation from my side so don't worry about it.
     
  3. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    After a discussion with Mad_King, the implementation will be a mix of the two previous proposals:

    1) the driver plugin will send a request to the Weather server to collect lat/long of the current track.
    2) regularly the plugin will contact the API website to retrieve the radar/satellite image (so each driver will use its own API KEY) -> avoid to add workload to the server, and avoid to use consume "quota" of the server API KEY (avoid to multiply by two the call frequency when using a free API KEY)

    3) The plugin will be parametrizable:
    - specify a IP for the server or use the rF2 dedicated address (case of weather server and rF2 dedicated server run on the address - will be the default value)
    - specify the port of the weather server (default will be the one provided in the weather server installation file)
    - port of this plugin to receive incomming data (like lat/long of the track)
    - API KEY to contact weather website api
    - frequency of website call
    - radius of the radar/satellite image (in km)
    - radar on/off, satellite on/off
    - image width and height
    -> parameter to display the image (don't know yet if i include it in the my Plugin TV, or if i allows an interface with the TV Remote Console, or i it will be a totally standalone plugin)
     
  4. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Hi Gerald,

    The reason why I asked for something to put in our website to follow the weather is better understood with the following:

    We are holding a race at Dijon and people are reporting that it is raining in the server and wunderground says that at Dijon it is a clear day.
    I don't know if the less than 0,2º between closest weather station to dijon.GDB coordinates that I can find in WU can make such a big difference.

    I think it could be easily made that the realtime server program generated and saved a nice image built from realtime weather conditions.
    This image would be overwritten periodically so that when called as an embedded image in a forum it would show realtime weather with the format you specify.

    I think that the radar image could also be included and some kind of future prediction.
    In order to be reaaly cool, it might require the use of GIF animated images and I don't know how difficult would be that...

    I WANT YOUR WIDGET GERALD BECAUSE YOU ARE THE BEST AND RFACTOR2 REQUIRES THE BEST WEATHER WIDGET ;)


    My colleague lagg, made an application to automatically generate a picture to display weather conditions to post them in our leagues race threads.
    Today the application is almost obsolete because of your program ;)
    If you have any trouble with image building , I guess lagg would gladfully help you with that.
     
    Last edited by a moderator: Jun 6, 2014
  5. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,374
    Likes Received:
    31

    Wow this sounds good :). Looking forward to can do some testwork.
     
  6. bwana

    bwana Registered

    Joined:
    Dec 25, 2011
    Messages:
    2,139
    Likes Received:
    1,040
    Great news Gerald, im sure this will be a must have ....

     
  7. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Ok but in this case (radar), the server need to connect to the website api and then it will use 2 tickets per call instead of one (what i wanted to avoid) so if you use the Free api you will call less regularly (twice less).

    I need to think about it.
     
  8. MaD_King

    MaD_King Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,827
    Likes Received:
    611
    I think with a short period refresh on you local player plugin and a large perimeter of view you will see the direction of the cloud in real time and so it's easy to see the movement of cloud and imagine what is expected to arrive over your head in the next minutes?
     
  9. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Maybe if the generated image included some kind of "powered by Weather Underground" with a direct link to their website by clicking the logo, they could grant us more than one API key per community.
    You would need yo modify the realtime executable to be able to use 2 or more API keys, alternating them in consecutive calls. Does it make sense?
     
  10. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Someone know how to retrieve the IP address and Port of the rF2 server (from inside the plugin of the rF2 Client or from outside) ?

    @SPASKIS : maybe it is possible to have several Free key with a single mail account (i must try)
     
    Last edited by a moderator: Jun 7, 2014
  11. Marek Lesniak

    Marek Lesniak Car Team Staff Member

    Joined:
    Oct 6, 2010
    Messages:
    1,585
    Likes Received:
    101
    I tried already and had no problems getting another key but didn't check, if the query limit (for weather data) is global, so per email account or per key.
     
  12. alpha-bravo

    alpha-bravo Registered

    Joined:
    Dec 22, 2012
    Messages:
    1,374
    Likes Received:
    31
    First I thought it will be possible via wmi classes but have not found any.
    ATM I'm not in near of my pc but maybe something like the (in command) netstat -a -o works.


    Gesendet von meinem iPad mit Tapatalk HD
     
  13. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    If the keys need to be related to the same email adresss, I have nothing to say.

    If not, I just wouldn't worry about it. In a league forum there will be no problem to get some keys from.different email adresses. In ours we already have two. We are only using one with two servers making use of it. Refresh is half but we didn't want to have two different installs just in case problems...


    enviado mediante tapatalk
     
  14. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Here the Radar Widget. I have decided to create it as a Widget of the TV Plugin (as it is usable also for drivers - for example creating an UI with just the radar and the DriverTiming Widget)
    Please read this post for exmplanation: TV Plugin

    The two tools have been updated
    - This rFactor2WeatherTool WeatherServer.exe
    - The rFactor2 TV Plugin (dll and remote console)

    Here a screenshot of the new Remote Console v1.1.0.0
    [​IMG]

    Here the result in the game (its Sebring, but i set manually another location as sebring was under clear condition)
    [​IMG]
     
  15. yusupov

    yusupov Registered

    Joined:
    May 22, 2014
    Messages:
    679
    Likes Received:
    16
    is the xml stilll being updated? a lot of tracks missing for me...
     
  16. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Hello,
    It is in XML because i don't want to be stucked to surevey each existing track and update the track list myself. It allows you to add what is missing and share it with the comunity in this thread. (after that i include those new tracks in a future build)
    Thank you
     
    Last edited by a moderator: Jun 8, 2014
  17. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Absolutely amazing. This will be a huge plus for race tv streaming!!

    enviado mediante tapatalk
     
  18. yusupov

    yusupov Registered

    Joined:
    May 22, 2014
    Messages:
    679
    Likes Received:
    16
    for some reason this has stopped working for me. is weather meant to be set to default or scripted? in either case im getting rF2 defaults. the time & duration is working properly, so im not sure why the weather isnt taking.
     
  19. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Did you have a custom ui. Like minimalui?

    Envoyé de mon GT-N7105 en utilisant Tapatalk
     
  20. yusupov

    yusupov Registered

    Joined:
    May 22, 2014
    Messages:
    679
    Likes Received:
    16
    i do indeed, i'm assuming i should disable it?
     

Share This Page