Jump to content
The simFlight Network Forums

Recommended Posts

Posted
I have several issues with setting weather via NWI.
I use FSUIPC 4.937 and Prepar3d 2.4.
  1. Wind layers. All is good when count of layers <= 2. If count of layers is greater than 2, it applies incorrectly. Seems like data (except UpperAlt) in all layers, except for the first two, are shifted by 1. I wrote a workaround for layers with indexes greater 2. I can describe my solution if it neccessary.
  2. Visibility.
    • a ) Why visibility is broken into two parts: a field Vis and an array UpperVis? Is this correct to count Vis as a first layer and layers from an array as a consequent layers? 
    • b ) When I write visibility layers to global section of the NWI, only layer from Vis is applying. When I read visibility layers from the NWI global section, I also get only first layer in Vis.
  3. Clouds.
    • a ) When I write cloud turbulence 0, it apply as 1 in P3D. So I can't set no cloud turbulence. All other values works well.
    • b ) Precipitation base altitude apply to P3D weather 10 times less. So I should to multiply this altitude by 10 before set it. It is not bad solution, but it reduces this altitude's available range to write.
  4. When I set up a lot of layers of clouds, winds and temperatures, a graphical artefacts are appear in the sim. In some cases weather in the sim simply disappear and weather set to clear (visually).
 

 

Posted
  1. Wind layers. All is good when count of layers <= 2. If count of layers is greater than 2, it applies incorrectly. Seems like data (except UpperAlt) in all layers, except for the first two, are shifted by 1. I wrote a workaround for layers with indexes greater 2. I can describe my solution if it neccessary

 

Is this a new bug in P3D's SimConnect?  Have you checked the actual SimConnect METAR strings which are being sent to SimConnect, because all the NWI does is make FSUIPC build those strings. I'm pretty certain it's always been okay with FSX and SP2/Acceleration versions of SimConnect.

 

 

  1. Visibility.
    • a ) Why visibility is broken into two parts: a field Vis and an array UpperVis? Is this correct to count Vis as a first layer and layers from an array as a consequent layers? 
    • b ) When I write visibility layers to global section of the NWI, only layer from Vis is applying. When I read visibility layers from the NWI global section, I also get only first layer in Vis.

 

In FS2004, for which the NWI was devised, it was only possible to have one visibility layer. Trying to use more never worked. Therefore the original design was for one layer. The additions was done in such a way as to not break existing programs. And yes, the layers all count.

 

I suspect the Global weather facility in SimConnect only allows one layer still. The global setting is really only used as the initial default for weather stations not yet set up.

 

 

 

  1. Clouds.
    • a ) When I write cloud turbulence 0, it apply as 1 in P3D. So I can't set no cloud turbulence. All other values works well.
    • b ) Precipitation base altitude apply to P3D weather 10 times less. So I should to multiply this altitude by 10 before set it. It is not bad solution, but it reduces this altitude's available range to write.

 

Check the METAR string being sent. It sounds like some odd changes in the SimConnect weather interface have been introduced. Please just double-check using the string versions -- you can get those by FSUIPC's logging or SimConnect logging.

 

If P3D have changed these things I suggest you might want to look at sending the METAR strings yourself rather than use the NWI.  I'd hoped folks would have moved on by now from that system devised in 2003 to match the binary hacked interface into FS2004.

 

You can send the strings via FSUIPC if you'd prefer not to use SimConnect directly.

 

 

 

  1. When I set up a lot of layers of clouds, winds and temperatures, a graphical artefacts are appear in the sim. In some cases weather in the sim simply disappear and weather set to clear (visually).

 

Hmm. Sounds like quite a few of the bugs in FSX's weather facilities have been carried over into P3D and maybe even made worse. Of course FSUIPC has no control over "artefacts" I'm afraid.

 

Pete

 

  • Upvote 1
Posted

Hello, Pete.

I've tested those issues with FSX and P3D 2.4 with FSUIPC 4.937 installed on both.

 

1. Wind layers. All is good when count of layers <= 2. If count of layers is greater than 2, it applies incorrectly. Seems like data (except UpperAlt) in all layers, except for the first two, are shifted by 1. I wrote a workaround for layers with indexes greater 2. I can describe my solution if it neccessary.

Is this a new bug in P3D's SimConnect?  Have you checked the actual SimConnect METAR strings which are being sent to SimConnect, because all the NWI does is make FSUIPC build those strings. I'm pretty certain it's always been okay with FSX and SP2/Acceleration versions of SimConnect.

It looks like FSUIPC generate incorrect metar string for wind layers.

I can set 3 layers of winds by setting metar:

GLOB 151552Z 20000KT&D100NG 20202KT&A200NG 20404KT&A400NG CLR 15/05 Q1013
And I get 3 layers of winds.

As I think similar configuration set to NWI generates metar:

szMETAR="GLOB 151041Z 20000KT&D100NG 20202KT&A200NG 20404KT&A200NG 0050&B0&D1 CLR 15/05&A24 Q1013 "
And I get only first 2 layers. Count of layers is 2 because in NWI generated metar second and third layers have similar altitude. 

 

2. Visibility.

  • a ) Why visibility is broken into two parts: a field Vis and an array UpperVis? Is this correct to count Vis as a first layer and layers from an array as a consequent layers? 
  • b ) When I write visibility layers to global section of the NWI, only layer from Vis is applying. When I read visibility layers from the NWI global section, I also get only first layer in Vis.
In FS2004, for which the NWI was devised, it was only possible to have one visibility layer. Trying to use more never worked. Therefore the original design was for one layer. The additions was done in such a way as to not break existing programs. And yes, the layers all count.

 

I suspect the Global weather facility in SimConnect only allows one layer still. The global setting is really only used as the initial default for weather stations not yet set up.

Thank you for your explanation about the visibility structures. But I have found strange addition in visibility blocks in metar string. When visibility layers count 0, NWI however adds one thin layer: 

0050&B0&D1
When visibility layers count is greater than 0, it also adds one thin extra layer.

 

3. Clouds.

  • a ) When I write cloud turbulence 0, it apply as 1 in P3D. So I can't set no cloud turbulence. All other values works well.
  • b ) Precipitation base altitude apply to P3D weather 10 times less. So I should to multiply this altitude by 10 before set it. It is not bad solution, but it reduces this altitude's available range to write.
Check the METAR string being sent. It sounds like some odd changes in the SimConnect weather interface have been introduced. Please just double-check using the string versions -- you can get those by FSUIPC's logging or SimConnect logging.

 

If P3D have changed these things I suggest you might want to look at sending the METAR strings yourself rather than use the NWI.  I'd hoped folks would have moved on by now from that system devised in 2003 to match the binary hacked interface into FS2004.

 

You can send the strings via FSUIPC if you'd prefer not to use SimConnect directly.

a ) It is really a P3D bug. Even when I set cloud turbulence by metar string, Light turbulence replaces None. On FSX such a setting works properly.

b ) Both FSX and P3D sets precipitation base altitude in 10 times less. I set to NWI 1000 feet (converted to meters of course) and get metar:

szMETAR="GLOB 151055Z 20000KT&D100NG 20202KT&A200NG 20404KT&A200NG 1609&B1&D1499 0050&B1500&D1 5ST020&ST010FNVN010N 15/05&A24 Q1013 "
It sets 100 meters not 1000 in both FSX and P3D. So precipitation base altitude in metar is tens of meters, not a hundreds. As a result, difference between altitude in NWI and real setting.

 

4. When I set up a lot of layers of clouds, winds and temperatures, a graphical artefacts are appear in the sim. In some cases weather in the sim simply disappear and weather set to clear (visually).

Hmm. Sounds like quite a few of the bugs in FSX's weather facilities have been carried over into P3D and maybe even made worse. Of course FSUIPC has no control over "artefacts" I'm afraid.

Not tested more.


If I understand correctly, you recommend to use METAR for setting weather in FSX and P3D. I don't want to use simconnect directly for saving simplicity in the my application. So, should I use offset 0xB000 for setting metar? Does it matter what a day and time to set in metar after icao code? What a correct sequence for setting the metar for: 1) an arbitrary weather station 2) global (and replace weather on all stations) 3) all station was not set? And how to get a global and station weather?

Posted

Hello, Pete.

I've tested those issues with FSX and P3D 2.4 with FSUIPC 4.937 installed on both.

 

It looks like FSUIPC generate incorrect metar string for wind layers.

I can set 3 layers of winds by setting metar:

GLOB 151552Z 20000KT&D100NG 20202KT&A200NG 20404KT&A400NG CLR 15/05 Q1013
And I get 3 layers of winds.

As I think similar configuration set to NWI generates metar:

szMETAR="GLOB 151041Z 20000KT&D100NG 20202KT&A200NG 20404KT&A200NG 0050&B0&D1 CLR 15/05&A24 Q1013 "
And I get only first 2 layers. Count of layers is 2 because in NWI generated metar second and third layers have similar altitude. 

 

 

I would need to see the actual NWI writes you are making to comment on that. When I test using the WeatherSet2 program, which is the demonstration and test bed for NWI, it works. To understand what might be wrong in your case I would need to see exactly what you are doing. Maybe via logging?

 

I won't have time in any case to look at this till December now, earliest, and i would be loathe to change anything because it is very old and very complex code and I'm likely to do more harm than good. It is also well used code, at least in the past. Nowadays good weather programs like OpusFSX and ActiveSky use SimConnect directly of course.

 

The above also applies to your precipitation base question. I am really amazed you can find such discrepancies after all these years though.

 

If I understand correctly, you recommend to use METAR for setting weather in FSX and P3D.

 

 

Well it involves much less for FSUIPC to do -- it simply passes it on without checking. so any errors are yours. ;-)

 

It's really my best answer because I don't think I'm in any position to ever adjust or change the NWI.

 

So, should I use offset 0xB000 for setting metar? 

 

 

If that's where it is documented -- sorry, i don't have access to my reference documentation at present. I think you might still need to set the ICAO (or 'GLOB') ID into the C8xx area -- doesn't it say that?

 

Does it matter what a day and time to set in metar after icao code?

 

I don't know. i wouldn't have thought so.

 

What a correct sequence for setting the metar for: 1) an arbitrary weather station 2) global (and replace weather on all stations) 3) all station was not set?

 

 

Why would there be a "correct sequence"? I'd need to refer to the Simconnect documentation for such data in any case. All FSUIPC is doing for you in the mode is sending the request on.

 

And how to get a global and station weather? 

 

 

You read the weather as documented. That populates both the NWI data areas AND gives you a METAR in the appropriate offset -- probably B800 as far as I recall?

 

Please be aware that the formats of READING and WRITING weather are rather different in a number of areas. The documentation is not good for either. Maybe the documentation in the P3D SDK is better. I don't know.

 

Regards

Pete

  • Upvote 1
Posted

Thank you for your answer, Pete. I consider using simconnect in the further development of a weather control.

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.