SimConnect_WeatherRequestCloudState returns all ones

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Locked
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

I am using P3D 3.4, calling SimConnect_WeatherRequestCloudState and all I am getting is an array of ones.
float maxLat = (float)pS->latitude + .1;
float minLat = (float)pS->latitude - .1;
float maxLon = (float)pS->longitude + .1;
float minLon = (float)pS->longitude - .1;
float maxAlt = (float)pS->altitude + 10;
float minAlt = (float)pS->altitude - 10;

hr = SimConnect_WeatherRequestCloudState(hSimConnect, 30, minLat, minLon, minAlt, maxLat, maxLon, maxAlt, 0);
The latitude and longitude is correct (somewhere over Florida). I receive the reply here and the reply looks normal with the correct request ID...
case SIMCONNECT_RECV_ID_CLOUD_STATE:
{
SIMCONNECT_RECV_CLOUD_STATE* pWxData = (SIMCONNECT_RECV_CLOUD_STATE*)pData;
Show(pWxData);
break;
}
I have tried increasing and decreasing the area, increasing the altitude. I've set the sim for clear skies and solid overcast...it's always 1s. Any clues?
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

More details. It seems to pick either all 0s or all 1s. I've only gotten those two values. If it starts with 0s it seems to stick with those. If it starts with 1s, it sticks with those...never changing. Changing the requestId doesn't help. I'm using the latest SimConnect for 3.4.
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by WarpD »

This has never worked. Ever.
Ed Wilson
Senior Developer
Mindstar Aviation
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

WarpD wrote: Sat Sep 02, 2017 11:10 pm This has never worked. Ever.
Hi Ed,

They posted a fix a few versions back...thought I'd give it a try. Turns out I was linked to, perhaps, a version of SimConnect that was before the fix. Can't seem to link to the new one with VS2017. Thinking about downgrading to VS2015 or something.

Gregg
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

WarpD wrote: Sat Sep 02, 2017 11:10 pm This has never worked. Ever.
After compiling and linking with the new library with P3D3.4, it seems the API still does not work. Flying through thick clouds for miles all I'm getting are zeros.
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

So, as far as I have obtained from this function so far, you either get all 0s or all 1s and I don't see any rhyme or reason in the difference. Flying in clear skies or in clouds doesn't seem to make a difference in the values.
seippg
Posts: 37
Joined: Mon May 12, 2014 10:33 pm

Re: SimConnect_WeatherRequestCloudState returns all ones

Post by seippg »

I managed to get this to return other values by trying various parameters...changing lat/long/altitude combinations. Can't say I see much correlation to what's happening outside the window but, sometimes, not all the time, if I'm in a large TCU I get higher values in the twenties and forties...though, other times in TCU I get 0 or 1. So, it works sometimes. Seems less accurate than AMBIENT IN CLOUD, though, it gives, at least, some intensity information. Might experiment with it some more. I consider this thread resolved.

Gregg
Locked