• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX SimConnect_WeatherRequestObservationAtStation

Messages
9
Country
unitedstates
I am trying to use the API mentioned in the title and am getting inconsistent results. It works sometimes, but very often I get no weather whatsoever, even for airports that are within 20NM radius of the aircraft position...

When I say I get no weather, I mean that SIMCONNECT_RECV_ID_WEATHER_OBSERVATION event never arrives. Is there a more reliable way of obtaining the weather? FSX must have some idea of the weather at fields that are just a few miles off of the aircraft path...

Thanks,
AW
 
To recept the weather from a station, the simulator have to know this station.

Yes, I am not sure what you mean here, though. This is exactly what I am doing: supplying an existing station ID, known to the simulator, to SimConnect_WeatherRequestObservationAtStation(). The simulator fails to respond, which is my problem.

If you use a user-defined weather, you have to use the following ID : "GLOB".

Again, I am not sure I understand you correctly. You seem to be saying that if user-defined weather is selected in the Sim, you have to use "GLOB"... But that gives you the global default weather. It tells you nothing about what happens at a particular station, which is what I am interested in.

What I am trying to do is to obtain a METAR for the departure, destination, and alternate airports, while the aircraft is still sitting at the gate at the departure airport, for example.

AW
 
From: http://msdn.microsoft.com/en-us/library/cc526983.aspx#SimConnect_WeatherRequestObservationAtStation

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.

Check the exception, and try the multiple polling :rolleyes:

Geoff
 
Last edited:
Back
Top