Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I'm trying to get the TOTAL amount of fuel (in lbs) that's loaded into the aircraft at a given time. I've only found how to get % readings via FSUIPC...

Is there an offset I missed?

Posted
I'm trying to get the TOTAL amount of fuel (in lbs) that's loaded into the aircraft at a given time. I've only found how to get % readings via FSUIPC...

Is there an offset I missed?

Evidently. For each of the (11 I think) possible tanks there's a capacity value and a percentage value. The fuel level in each is therefore calculable, and the total is obtained by adding them all up.

The capacity variable is right next to the percentage value in each case. How could you have not seen them?

Regards,

Pete

Posted

Excuse me if Im wrong, but isnt the total fuel weight at any particular time = Gross wt - Zero Fuel wt (assuming during flight you are not throwing passengers out of the plane).

This is how I do it in delphi. Seems to work, but possibly wrong.

function TFormMain.FuelWeight:double;
var
  CLW:double;
  ZFW:integer;
  dwResult:DWORD;
  FW:double;

begin
  if FSUIPC_Read($30C0,8, @CLW, dwResult) then
        begin
          if FSUIPC_Process(dwResult) then
            begin
            end
        end else DoCantConnect(dwResult);

  if FSUIPC_Read($3BFC,4, @ZFW, dwResult) then
        begin
          if FSUIPC_Process(dwResult) then
            begin
              ZFW:=ZFW div 256;
            end
          end else DoCantConnect(dwResult);

  FW:=CLW-ZFW;
  FuelWeight:=FW;

end;

Posted
Excuse me if Im wrong, but isnt the total fuel weight at any particular time = Gross wt - Zero Fuel wt (assuming during flight you are not throwing passengers out of the plane).

Of course you are rightI thought FS2004 complicated it by allowing payloads (see for instance the FSUIPC variables at offsets 1400 ff.) but of course they will be included in the ZFW. Won't they?

Pete

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
×
×
  • 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.