December 18, 200619 yr 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?
Create an account or sign in to comment