P3D v4 Unable to get nearest weather station observation

#1
Hello all
i used the simconnect fonction :
C#:
simconnect.WeatherRequestObservationAtNearestStation(Request.NearestStation, (float)Aircraft.latitude, (float)Aircraft.longitude);
but it returns an exception : 15
which is unable to get observation

hope you help me
thnx in advance
 
#2
Not much to go on here. Have you tried other lat,long numbers hard coded.

Also did you read this - assume yes:


The exception SIMCONNECT_EXCEPTION_WEATHER_UNABLE_TO_GET_OBSERVATION is returned in a number of cases, including that the station provided as a parameter does not exist. However there is one case where this exception is returned that a client should not treat as an error, and that is when the weather station does not have any valid data to return because it has not been recently updated with its current weather. In this case a client could keep polling for a weather observation until a valid metar string is returned. This could take 10 seconds or more, as there are certain situations when a user can reset the weather through the UI that clears many of the weather stations of their current weather, and it takes some time for the weather engine to regenerate all the weather settings.
 
#3
Not much to go on here. Have you tried other lat,long numbers hard coded.

Also did you read this - assume yes:


The exception SIMCONNECT_EXCEPTION_WEATHER_UNABLE_TO_GET_OBSERVATION is returned in a number of cases, including that the station provided as a parameter does not exist. However there is one case where this exception is returned that a client should not treat as an error, and that is when the weather station does not have any valid data to return because it has not been recently updated with its current weather. In this case a client could keep polling for a weather observation until a valid metar string is returned. This could take 10 seconds or more, as there are certain situations when a user can reset the weather through the UI that clears many of the weather stations of their current weather, and it takes some time for the weather engine to regenerate all the weather settings.
I found the problem :)

all i had to do is the change the waether theme to any theme except the Clear skies

as clear skies is a null metar
so it had problems getting it
 
Top