The simFlight Network Forums

# Who can help me please for FSUIPC

## Recommended Posts

I want to put fuel in my plane an A319.

The full capacity of the plane's tanks is 19458 Kg

I want to put in the tanks only 4230 Kg

I don't know how to use the offset :

WriteResult = FSUIPC_Write(&HB74, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HB7C, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HB84, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HB8C, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HB94, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HB9C, 4, VarPtr(fuel), dwResult)

WriteResult = FSUIPC_Write(&HBA4, 4, VarPtr(fuel), dwResult)

What are the value tu put in my variable "fuel" ?

Can you help me please ?

Thanks

Regards

##### Share on other sites

I want to put fuel in my plane an A319.

The full capacity of the plane's tanks is 19458 Kg

I want to put in the tanks only 4230 Kg

I don't know how to use the offset

Sorry if the short-hand in the documentation is a bit obscure, but I expected folks to be using FSInterrogate, which does those calculations for you and shows original value and derived proper values so you can see exactly what happens, in real time. Have you tried that program at all?

The documented formula "% * 128 * 65536" just means that 100% is represented by the value 128 * 65536 (which looks strange but is simply hex 800000).

So 4230/19458 would be represented by

(4230/19458) * 128 * 65536.

The other way of doing it, of course, is to put that amount of fuel in the tank and seeing what the offset reads (either in FSInterrogate, or via the FSUIPC Monitor facilities).

All the tools are provided for you to reasearch this sort of thing for yourself, and it isn't really so difficult.

Regards

Pete

## Create an account

Register a new account