Jump to content
The simFlight Network Forums

Dutch

new Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Dutch

  1. The fuel loading works fine, sorry I wasn't clear on that. The payload works fine too, just not hitting the gross weight as we know. This was certainly not a criticism of FSUIPC, just a request for help if possible. I did read that paragraph but I misunderstood it to mean that I was the one that needed to do the refreshing by rewriting the values, which I did after every station load and again at the end of the process. Now I understand that to mean we can only count on the values if they are refreshed by opening the payload menu and closing it. That's fine, I'll just document that and live with the FS9 restriction. It's a small thing anyway. Thanks for the quick reply, Dutch
  2. Hi all, This may have been answered here but if so I didn't find it in a search for any of the keywords I could think of :) My program (FSCaptain) auto-loads the fuel and payload into the aircraft. In FSX this works fine, and in FS9 it appears to work but in fact it never changes the gross weight of the airplane (offset 0x30C0.) The result is that difference between the gross weight and the sum of the weights loaded in the fuel tanks and payload stations is considered "Ice Weight" and shows up as ice on the wings in the ice warning gauge supplied with FSCaptain (that most people never seem to use and few have noticed in the year it's been out!) My question is, why doesn't a write to 0x30C0 and 0x30C8 with the correct numbers solve this problem? Am I doing something silly or missing a magic incantation? Here's the code: FSUIPC_Write( 0x13FC, 4, &stncnt, &dwResult); // station count FSUIPC_Write( 0x1400, sizeof(loadstn) * stncnt, &LoadStation, &dwResult); FSUIPC_Process(&dwResult); // FS9 does not recalculate aircraft weights, we will do it here and load them if (SimVersion == 9) { GetFuel(); GetPayload(); flt64 = ACEmptyWgt + TotalFuelPounds + TotalPayload; FSUIPC_Write(0x30C0, 8, &flt64, &dwResult); FSUIPC_Process(&dwResult); flt64 *= 32.174049; FSUIPC_Write(0x30C8, 8, &flt64, &dwResult); FSUIPC_Process(&dwResult); zfw = ACEmptyWgt + Payload; FSUIPC_Write(0x3BFC, 4, &flt64, &dwResult); FSUIPC_Process(&dwResult); } Now the payload stations get written just fine. I've checked and rechecked this in the debugger and the writes get executed and the correct numbers are in the variables. But the gross weight read back from 0x30C0 or from the sim variables reporting the same number never changes until I bring up the payload dialog from the FS menu and close it -- then FS9 recalculates things properly. Thanks for any pointers. Slightly frustrated, Dutch PS. A word of appreciation for FSUIPC without which so much wouldn't have been possible in the FS world! We'd all still be marveling at what SimConnect could do for us...and FSUIPC still does so much more!
×
×
  • 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.