Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

I`m looking for the offset to modify the fuel-quantity in FS2004.

I want to change the fuel-quantity up or down. I didn`t found one :( , but I think it must be there because Enrico is using it. He controls the fuel-quantity over the CDU. :D

Best Regards

and Thanks

Thomas EW321

Posted

It is in this doc: http://www.schiratti.com/files/dowson/FSUIPC_SDK.zip

Here is all fuel levels and capacitys:

Offset/size/description.

0B74 4 byte Fuel: centre tank level, % * 128 * 65536 Ok Ok

0B78 4 byte Fuel: centre tank capacity: US Gallons (see also offsets 1244–for extra FS2k/CFS2 fuel tanks) Ok Ok

0B7C 4 byte Fuel: left main tank level, % * 128 * 65536 Ok Ok

0B80 4 byte Fuel: left main tank capacity: US Gallons Ok Ok

0B84 4 byte Fuel: left aux tank level, % * 128 * 65536 Ok Ok

0B88 4 byte Fuel: left aux tank capacity: US Gallons Ok Ok

0B8C 4 byte Fuel: left tip tank level, % * 128 * 65536 Ok Ok

0B90 4 byte Fuel: left tip tank capacity: US Gallons Ok Ok

0B94 4 byte Fuel: right main tank level, % * 128 * 65536 Ok Ok

0B98 4 byte Fuel: right main tank capacity: US Gallons Ok Ok

0B9C 4 byte Fuel: right aux tank level, % * 128 * 65536 Ok Ok

0BA0 4 byte Fuel: right aux tank capacity: US Gallons Ok Ok

0BA4 4 byte Fuel: right tip tank level, % * 128 * 65536 Ok Ok

0BA8 4 byte Fuel: right tip tank capacity: US Gallons Ok Ok

Hope you don't mind I answer :D , Pete may confirm.

Posted
It is in this doc: http://www.schiratti.com/files/dowson/FSUIPC_SDK.zip

Here is all fuel levels and capacitys:

Yes, there are also another set at offsets 1244 to 1260. They deal with Cenre2, Centre3, External1 and External2 tanks, for any aircraft which may have them.

You can write to the levels to change the content. 100% is 128 in the high word, or 128*65536 (hex 0x00800000) in the 32-bit double word.

Hope you don't mind I answer :D , Pete may confirm.

Yes. Thanks for replying. I only added to it. :wink:

Regards,

Pete

Posted

Hi Pete, Hi Lennart,

thanks for answer.

I this Offsets, but I can not write in. If i.e. CTR-Tank in highbyte (0B7E) is 30 and I write in 15 it changes after a half second back to 30. Same on all other Offsets (Tanks). I think maybe it must set another offset before or after, but which ??

Maybe someone know.

Best Regards

Thomas EW321

Posted
Sorry I lost one word, should be3 written!

I know this offsets...

The offsets quoted above are correct, and they do work. Keep in mind you need to write 4 bytes. For the center tank, you need something like:

FSUIPC_Write ( 0x0B74, 4, &Your_UINT32_Variable, &Result );

Doug Dawson

Posted
.

I this Offsets, but I can not write in. If i.e. CTR-Tank in highbyte (0B7E) is 30 and I write in 15 it changes after a half second back to 30. Same on all other Offsets (Tanks). I think maybe it must set another offset before or after, but which ??

Sorry, the value is a 32-bit DWORD. You have to write all 4 bytes,so 15*65536 in your case, as documented. The control used to change the fuel does not accept 16-bit values. Almost all the values listed in the SDK have a length which is significant. There are some exceptions, for instance for BOOLEAN values which are either 0 or 1 -- you can usually then get away with writing just the low byte in those cases as the rest are all zero in any case.

The reason for this is that it is the first byte, i.e. 0B7C in your example, which is the "token" for the variable you want to change, and it is this which triggers the action from FSUIPC.

Regards,

Pete

Posted

Hi Pete,

with full offset all is working well. Thanks a lot, I think I need bigger glasses to read, maybe then I will read all words and not only 2 of 3.

:lol:

Thanks and Best Regards

Thomas EW321

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.