Archived

This topic is now archived and is closed to further replies.

JoaoPagotto

Project WX Storm Scope to MSFSX

Recommended Posts

I am developing a Scope to MSFSX Storm, but I can not get the status of the cloud.I'm using SimConnect for data and function: SimConnect_WeatherRequestCloudStateBelow is the code, note that the "pWxData-> rgbData" is always zero.Please friends, can someone save me?I'am attached file in:http://www.fsdeveloper.com/forum/showthread.php?p=332033#post332033Thanks

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hello friends.I tried everything to get the power status of the cloud around the aircraft to create a StormScope, but so far without success.Below is the code, everything works normally step around the range and altitude of the aircraft of the same, but the array of 64x64 rgbData always been zero. I do not know what else to do. Any hint or help will be very grateful. My little one StormScope project is stopped because of it. After all have any other way to get the status of the clouds by FSUIPC or other library?I need help from friends.//----------------------------------------------------------case SIMCONNECT_RECV_ID_CLOUD_STATE:{ SIMCONNECT_RECV_CLOUD_STATE* pWxData = (SIMCONNECT_RECV_CLOUD_STATE*) pData; printf("%dn", pWxData->dwArraySize); // OK. Returns 4096 = 64x64 for (int x=0; x < pWxData->dwArraySize; x++ ) { if ( pWxData->rgbData[x] != 0 ) { printf("pos:%d, val:%d :]n", x, pWxData->rgbData[x]); } } break;}

Share this post


Link to post
Share on other sites

HiI was testing this function, because I’d want to introduce weather radar for my panel.I‘ve compiled the function with these values:hr = SimConnect_WeatherRequestCloudState( hSimConnect, REQUEST_CLOUDSTATE, (pS->latitude-0.16), // minLat (pS->longitude-0.16), // minLon 0.0, // minAlt (pS->latitude+0.16), // maxLat (pS->longitude+0.16), // maxLon 49000.0, // maxAlt 0); //Double word containing any flags. Reserved for future use.Remember one degree of latitude or longitude is 60.043 NM (nautical miles), in my case 0.16 degree is approximately 10 NM from user aircraft.To be sure that the altitude range is covered, I put from 0.0 to 49000 feet. I also took into account in selecting two cases from FSX:1) World >> Weather >> Major Thunderstorm.2) World >> Weather >> Clear Skies. First caseSIMCONNECT_RECV_CLOUD_STATE* pWxData = (SIMCONNECT_RECV_CLOUD_STATE*) pData;pWxData->rgbData[1] it should return 0xff or 255Second casepWxData->rgbData[1] it should return 0x00 or 0In both cases “pWxData->rgbData[1]” always return 0If anyone knows how to use this function please let me know !!!!!CheersMartinPlease visit my channel for watching my panel !!!!!http://www.youtube.com/user/romemart

Share this post


Link to post
Share on other sites

i had the same problem. Whatever i tried, it always returned 0. I also wanted to create a weather rader

Share this post


Link to post
Share on other sites

That WX question was asked during a recent project , the panel equipped with an old stormscope that detects only lightning discharges , a beta tester asks why it cant work , the choral in the background sings ` It cant be done `in a heavenly voice ,

 

As a long time coder of FSX aircraft i get ideas that approach questions in terms of visibility variables triggering parts to appear and move in concert with an aircrafts orientation , in this case i had the thought i could read the conditions that support lightning instead of the lightning itself , the conditions being rain and barometric pressure being low.

 

The radar when on will detect lightning, there are it seems more ways to determine conditions than just the condition itself , the lack of a condition is a state , 0 , if there is a link to pressure density at altitude for cloud coverage rendering as well determining that pressure link will yeald the variables you seek to make a display with luck.

 

Best CJ

Share this post


Link to post
Share on other sites