Sign in to follow this  

Reading Weather via FSUIPC

Recommended Posts

I'm trying to add a working weather radar to my Boeing 707 panel (featured at the Historic Jetliners Group), but I can't seem to read the weather information. I can read OK at the aircraft's position (0xC000 offset), but not elsewhere. My current section of code for reading weather is: FSUIPC_Read( 0xCC00, 1024, &Weather[radarcellcounter], &upcerror); FSUIPC_Process(&upcerror); for (i = 0; i < 71; i++) oktas[radarcellnumbers] = oktascheck( Weather, 10.0 ); radarcellcounter++; if (radarcellcounter >= 71) { radarcellcounter -= 71; } findcellcoordinates(radarcellnumbers[radarcellcounter], &weatherradarlatitude, &weatherradarlongitude, &weatherradaraltitude); tempcellnumber = radarcellnumbers[radarcellcounter]; // writing co-ordinates for next read FSUIPC_Write( 0xCC10, 8, &weatherradarlatitude, &upcerror); FSUIPC_Write( 0xCC18, 8, &weatherradarlongitude, &upcerror); FSUIPC_Write( 0xCC08, 4, &blankICAO, &upcerror); FSUIPC_Write( 0xCC04, 4, &tempcellnumber, &upcerror); FSUIPC_Process(&upcerror);(Note this code is inside a SetTimer call, run 18 times per second)As the code stands it reads in the weather at the first interrogated latitude and longitude, but not other lat/long combinations. If I try setting 0xCC04 to the same number for each read (either zero, or a nonzero constant), loading the panel causes an instant CTD.What am I doing wrong?

Share this post

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

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
Sign in to follow this