Jump to content
The simFlight Network Forums

Issue with the weather services


Recommended Posts

Hi Paul,
I have some issues with the weather service examples. None of them works, except simconnect METAR strings which works sporadically. Mostly I get the error message: 'FSUIPC_ERR_TimeOut. Weather station EDDN is currently not available or is invalid'. EDDN is just one excample. It's the same with other weather stations. I use P3D V4.5, .net FSUIPC DLL 3.1.11

Ruediger

Link to comment
Share on other sites

Hi Ruediger,

The first thing to try is to increase the timeout for weather reading. In the Sample Projects I set them to 2000ms. (See Code Below).

Try increasing this to something like 10 seconds. If it works you'll be able to see how much time it takes for the weather to be read.

I only have FSX. Maybe P3D takes a bit longer to provide weather to FSUIPC.

Paul

        private void btnGetWeatherAtAirport_Click(object sender, EventArgs e)
        {
            // Using a try catch block as the service will time out if the weather station is not active
            // This could be because the IACO is not valid, or it is out of range and therefore inactive
            WeatherServices ws = FSUIPCConnection.WeatherServices;
          
            // The time out can be changed. Here it's set to 2 seconds. This is usually enough time for weather data to be returned.
            ws.LocationReadTimeout = 2000; // <<<<<<<<<< TRY SETTING A LONGER TIMEOUT
          
            try
            {
                FsWeather weather = ws.GetWeatherAtLocation(this.txtICAO.Text.ToUpper());
                displayWeather(weather);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "FSUIPC Examples", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }

 

Link to comment
Share on other sites

Hi Paul,
even with an increased timeout I could not get the weather demos running. I did a quick implementation by myself (reading the weather at the aircrafts position), using your weather services. This works fine. Timeout set to 2000ms. I will continue with my implementation and contact you in case I get hit by the problem again.

Many thanks for your fast response. Very appreciated!

Ruediger

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.