[REL] rFactor2 Weather Tool

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

  1. msportdan

    msportdan Banned

    Joined:
    Apr 22, 2014
    Messages:
    850
    Likes Received:
    0
    just wanna say thanks for this great tool, have waited ages to try it but last nite I gave the staic version a go and it adds a new dimension to racing again. Why is this not featured in Rf2 directly is beyond me..

    but great work thanks you.
     
  2. yusupov

    yusupov Registered

    Joined:
    May 22, 2014
    Messages:
    679
    Likes Received:
    16
    any chance of an updated track list, or anyone who has maintained theres willing to share?
     
  3. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Hi Gerald is it possible to add/change the "rain intensity cap" function? Now the rain ist just capped at a certain level and when it comes to drivibility you often have to cap at 10-20%. But normally the rain data from wunderground if above 10-20% if it rains so if it's raining the intensity is directly capped at maximum. So there is no kind of variety in the rain intensity on the server. Just no rain or full rain.

    Is it possible to not cap the intensity but make it a percentage function, for example it you set it to 50%, the plugin gets the info that it's 80% raining than is raining at 40% on the server, or if you set it to 10% and the plugin gets the info that it's 50% raining than is raining at 5% on the server.

    I hope i could make clear what i meant :D
     
  4. DocJones

    DocJones Registered

    Joined:
    Jan 26, 2011
    Messages:
    403
    Likes Received:
    5
    I have a question to Gerald aswell: What exactly happens when, as in most cases, the latitude and longitude coordinates from .gdb files do not match those of a weather station exactly? Say the track is in the middle of a triangle of 3 weather stations, does rF2 weather server (or Wunderground?) calculate the average for all relevant values (temperature, rain, cloudiness etc) of those stations and sends that to the rF2 dedicated server? Or does it only use data from the closest weather station? In case it's the latter, what happens if that station doesn't have precipitation data?
     
  5. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Version 2.2.3 Available (only WeatherServer.exe is modified)

    I think Wunderground take the closest weather station
     
  6. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Gerald you are the man :D Did you just forget to label the new function different or do i have to set this new function somewhere else?

    I also have a second question. Can you explain how the rain intensity is calculated or does this information just come from wunderground? I ask because i sometimes can't understand the behaviour of the rain intensity. When the weather station we use shows rain (Precip Rate see here: http://www.wunderground.com/personal-weather-station/dashboard?ID=KGAATLAN49) it sometimes rains and sometimes not. And the intensity doesn't seems to depend on the Precip Rate. I watched the Precip Rate go up and down but it doesn't affect the rain intensity directly
     
  7. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    I forgot to rename the label. So you have the chance to propose me a understandable label :)

    For the raining condition, here the algorythm
    Code:
            
            private void computeRainWeather(Plugin owner, JsonCondition obj, WeatherData data)
            {
                string sw = obj.current_observation.weather;
                if (sw.Equals("Patches of Fog") || sw.Equals("Shallow Fog") || sw.Equals("Partial Fog"))
                {
                    data.Weather = WeatherData.WEATHER.LightCloudy;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Equals("Partly Cloudy") || sw.Equals("Scattered Clouds"))
                {
                    data.Weather = WeatherData.WEATHER.PartiallyCloudy;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Equals("Mostly Cloudy"))
                {
                    data.Weather = WeatherData.WEATHER.MostlyCloudy;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Equals("Overcast"))
                {
                    data.Weather = WeatherData.WEATHER.Overcast;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Equals("Small Hail"))
                {
                    data.Weather = WeatherData.WEATHER.OvercastAndRain;
                    data.RainChance = 100;
                    data.RainIntensity = MathUtil.GetRandomInt(10, 33);
                }
                else if (sw.Contains("Squalls"))
                {
                    data.Weather = WeatherData.WEATHER.LightCloudyAndRain;
                    data.RainChance = 100;
                    data.RainIntensity = MathUtil.GetRandomInt(5, 33);
                }
                else if (sw.Contains("Funnel Cloud"))
                {
                    data.Weather = WeatherData.WEATHER.MostlyCloudy;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Contains("Clear"))
                {
                    data.Weather = WeatherData.WEATHER.Clear;
                    data.RainChance = 0;
                    data.RainIntensity = 0;
                }
                else if (sw.Contains("Light"))
                {
                    if (sw.Contains("Thunderstorm"))
                    {
                        data.Weather = WeatherData.WEATHER.LightCloudyAndRain;
                    }
                    else
                    {
                        data.Weather = WeatherData.WEATHER.LightCloudyAndRain;
                    }
                    data.RainChance = 100;
                    data.RainIntensity = MathUtil.GetRandomInt(5, 33); 
                }
                else if (sw.Contains("Heavy"))
                {
                    if (sw.Contains("Thunderstorm"))
                    {
                        data.Weather = WeatherData.WEATHER.OvercastAndStorm;
                    }
                    else
                    {
                        data.Weather = WeatherData.WEATHER.OvercastAndRain;
                    }
                    data.RainChance = 100;
                    data.RainIntensity = MathUtil.GetRandomInt(67, 100);
                }
                else
                {
                    if (sw.Contains("Thunderstorm"))
                    {
                        data.Weather = WeatherData.WEATHER.MostlyCloudyAndStorm;
                    }
                    else
                    {
                        data.Weather = WeatherData.WEATHER.MostlyCloudyAndRain;
                    }
                    data.RainChance = 100;
                    data.RainIntensity = MathUtil.GetRandomInt(34,66);
                }
            }
     
  8. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Uhh yeah. Maybe Felix rain function? :D Just kidding :D I have no clue but i will think about it :D

    So do i understand this code right that depending on the sw.contains and/or sw.Equals constant you set a range of rain intensity from which than randomly is chosen a value for the rain intensity send to the server?
     
  9. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
  10. McFlex

    McFlex Registered

    Joined:
    Feb 23, 2012
    Messages:
    1,031
    Likes Received:
    317
    Ah ok good to know. I was despair to figure out how to predict when and how much it would rain :D

    Wouldn't it be possible to calculate the rain intensity from the precip rate? Or is this data not provided by the wunderground api?
     
  11. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Does anyone have a source of the problem for the sudden changes in cloud texture? I am not sure whether it is caused by having realtime weather active or just rF2.
     
  12. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Did you set an enough time delai to apply the wheather?
     
  13. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    delay? I have 30 second smoothing.
     
  14. Dobbie

    Dobbie Registered

    Joined:
    Mar 5, 2015
    Messages:
    73
    Likes Received:
    27
    Hello,

    i´m going to animate my community to implement your great tool to our servers. Yesterday we have driven an scripted weather at first time. Here it isn´t necessary at which time of day we drive. We mostly drive short events on one evening with around 30min training/quali and around an hour of race.
    In your static weather tool it is possible to adjust the local time of the event, maybe Training at 9am, Quali at 12 and Race at 3pm and import it to rF2. In my opinion this is a great solution to simulate an complete Raceday in 2h, with weather of a whole day. But unfortunately it seems unpossible to fix the time of every single event in your Realtime-Server-Tool!?

    Is there any possibility to do this in future?


    Thanks and regards,

    Dobbie
     
  15. argo0

    argo0 Registered

    Joined:
    Jan 22, 2012
    Messages:
    624
    Likes Received:
    8
    I'm not at my PC but don't you have to 'unlink' the sessions by clicking that double arrow icon?
     
  16. Dobbie

    Dobbie Registered

    Joined:
    Mar 5, 2015
    Messages:
    73
    Likes Received:
    27
    Hi,

    sorry, don´t know what you talking about. I don´t understand if the "Weather Tool" is combined with the "Weather Server"?! On Weather Tool there is the double chain which seperate the session start time. On Weather Server i don´t see anything like this. On Weather Tool we´re able to "update session start time and duration" in plr/json file. But is this relevant for Weather Server?

    I can´t see this but i´m not sure...
     
  17. argo0

    argo0 Registered

    Joined:
    Jan 22, 2012
    Messages:
    624
    Likes Received:
    8
    So sorry, I misread your post. Good luck. Hope you find a solution.
     
  18. Josete_Chaco

    Josete_Chaco Registered

    Joined:
    Nov 8, 2013
    Messages:
    39
    Likes Received:
    0
    Hello everyone , first to congratulate the creator of the plugin because it is simply fantastic.

    We are trying to mount the plug on a server and have some doubts :


    If it is not possible to do remote desktop to the server , as you can run the plug and handle it?

    Thanks and regards.
     
  19. Josete_Chaco

    Josete_Chaco Registered

    Joined:
    Nov 8, 2013
    Messages:
    39
    Likes Received:
    0
    *someone please help me?

    As if I have not explained well and the translator does not help :) I want to know is whether I set everything on the server, but the server does not have Remote Desktop , and can run the weatherserver.exe ? It can be run from another PC than the server? and if this is how it is configured ?

    thank you very much to all in advance .

    regards
     
  20. MaD_King

    MaD_King Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,827
    Likes Received:
    611
    If you want only to define Meteo from past or prediction (rFactor2 Weather Tool only) I think you can do it on your own client PC, because, the aim of the software is to create .wet files in the settings folder of the track (UserData\player). And after you copy manually this file on your server and launch it in scripted mode to take into account the file.

    If you want to use the Weather Server, Not sure you can do that.
    (I don't see destination address in the configuration file : [SERVER]
    Port=666
    DefaultWeatherUndergroundAPIKey=043xxxxxxx
    )
     

Share This Page