Jump to content
The simFlight Network Forums

How do i calculate/get the fuel used?


FlyingCoder

Recommended Posts

4 hours ago, John Dowson said:

You can try the following offsets which hold the GENERAL ENG FUEL USED SINCE START indexed simvar for 4 engines: 0x090C. 0x09A4, 0x0A3C. 0x0AD4

Hi John,

What is the expected result? I'm flying the PMDG 738. Do i have to get value of all engines then add them up?

Link to comment
Share on other sites

3 minutes ago, FlyingCoder said:

What is the expected result?

How can I possibly answer that?

3 minutes ago, FlyingCoder said:

Do i have to get value of all engines then add them up?

Yes.

4 minutes ago, FlyingCoder said:

I'm flying the PMDG 738.

These may or may not hold the correct value - try monitoring those offsets, using FSUIPC's offset monitoring facilitis, as you fly and see if the values increase from 0...
If they don't work, you can use the PMDG offsets (from the Offset Mapping for PMDG 737 document - should also apply to the 738):

6494 4 FLT32 FUEL_QtyCenter LBS
6498 4 FLT32 FUEL_QtyLeft LBS
649C 4 FLT32 FUEL_QtyRight LBS

You would need to initially read and save the quantities at the start of the flight, and then whenever you want to know how much fuel has been used simply read them again and subtract that number from the initial values.

 

Link to comment
Share on other sites

18 minutes ago, John Dowson said:

How can I possibly answer that?

Yes.

These may or may not hold the correct value - try monitoring those offsets, using FSUIPC's offset monitoring facilitis, as you fly and see if the values increase from 0...
If they don't work, you can use the PMDG offsets (from the Offset Mapping for PMDG 737 document - should also apply to the 738):

6494 4 FLT32 FUEL_QtyCenter LBS
6498 4 FLT32 FUEL_QtyLeft LBS
649C 4 FLT32 FUEL_QtyRight LBS

You would need to initially read and save the quantities at the start of the flight, and then whenever you want to know how much fuel has been used simply read them again and subtract that number from the initial values.

 

Hi John,

 

Sorry, i am using your Offset and getting 115503102 and increasing.

I forgot about PMDG 737 offsets. I will take a look at it and see if these solution work. Thank you

Link to comment
Share on other sites

10 minutes ago, FlyingCoder said:

Sorry, i am using your Offset and getting 115503102 and increasing.

It is a 32-bit float (as documented), not an integer, so I suspect that you are reading them incorrectly - monitor them as FLT32.

Just checked in the PMDG 737 and they seem to be working correctly, starting at 0 and increasing:

Quote

      1703 Monitor IPC:090C (FLT32) = 0.0000
     1703 Monitor IPC:09A4 (FLT32) = 0.0000
     1719 Monitor IPC:0A3C (FLT32) = 0.0000
     1719 Monitor IPC:0AD4 (FLT32) = 0.0000
...
   251938 Monitor IPC:090C (FLT32) = 0.2448.
   251938 Monitor IPC:09A4 (FLT32) = 0.2448
...
   252375 Monitor IPC:090C (FLT32) = 0.4900
   252375 Monitor IPC:09A4 (FLT32) = 0.4900
...
   253313 Monitor IPC:090C (FLT32) = 0.7369
   253313 Monitor IPC:09A4 (FLT32) = 0.7369
...
   254266 Monitor IPC:090C (FLT32) = 0.9828
   254281 Monitor IPC:09A4 (FLT32) = 0.9828
...
   255266 Monitor IPC:090C (FLT32) = 1.2284
   255266 Monitor IPC:09A4 (FLT32) = 1.2284
...

Of course, only two offset changing as there are inly two engines.

John

Link to comment
Share on other sites

I'm using c# for my application. 32-bit float i believe is float or double? Which one should i use for the FLT32. There is no FLT32 type in c#.

Example code
 

public Offset<Int32> Engine1fuelUsed = new Offset<Int32>(0x090C);// Engine 1


Hope to get some clarification thank you

Link to comment
Share on other sites

19 minutes ago, FlyingCoder said:

I'm using c# for my application. 32-bit float i believe is float or double? Which one should i use for the FLT32. There is no FLT32 type in c#.

float - a double would be 64-bits. FLT32 is what is used in FSUIPC's offset monitoring facilities and is not a language data type.

20 minutes ago, FlyingCoder said:
public Offset<Int32> Engine1fuelUsed = new Offset<Int32>(0x090C);// Engine 1

I don't use C#, but maybe try:

public Offset<float> Engine1fuelUsed = new Offset<float>(0x090C);// Engine 1

 

Link to comment
Share on other sites

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.