plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


question

PeakMercury3697 avatar image
PeakMercury3697 asked FlyingRaccoon answered

SURFACE CONDITION variable is not updated every time

Hi,


I am trying to read the condition of the surface below the aircraft using SURFACE CONDITION variable. This variable is not updated every time I change the weather. For example, when I switch from clear weather to snowy weather, the variable is updated but when I switch back to clear weather or rainy weather, it usually stays snowy. Also, the variable SURFACE INFO VALID which is used to check for validity of SURFACE CONDITION is always 0 in my case. I try to retrieve these variables at SIM_FRAME.

Do you have any idea to force MSFS to update that variable?

Thanks in advance!

simconnectc++
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered

Hello @PeakMercury3697

I don't reproduce the problem you describe on SURFACE CONDITION. Keep in mind there is a bit of inertia when you change weather conditions.
For example, when switching from rainy to clear skies, the ground stays wet for a bit of time so the simvar will not be set to 0 immediately.

Make sure the values you get match the ones shown in the SimVarWatcher tool.

Regarding the SURFACE INFO VALID simvar, it's inherited from FSX but MSFS doesn't use it.
We'll review if we can set it in a relevant way. For now, just assume it's always valid as long as you are in a flight.

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.