• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Control fuel quantity

Messages
61
Country
france
I would like to know if this code could work ?

200 (>A:FUEL TANK LEFT MAIN QUANTITY,liters)

I can't make it work.

Thank you for your help
 
I would like to know if this code could work ?

200 (>A:FUEL TANK LEFT MAIN QUANTITY,liters)

I can't make it work.

Thank you for your help

Looks like you want to put 200 liters into that tank. In other words, to write to A:FUEL TANK LEFT MAIN QUANTITY. But A vars are read only, so you're correct, that won't work.

Try using the key event, XXX (>K:ADD_FUEL_QUANTITY) to accomplish what you want. XXX is a dimensionless number between 0 and 65535, where 65535 represents the maximum aircraft fuel capacity as defined in your aircraft.cfg file. Note that this event adds fuel, it does not set fuel to a specific quantity.

So, if you want to add fuel to completely fill the aircraft, use
65535 (>K:ADD_FUEL_QUANTITY)

To add 50% of the fuel capacity
65535 2 / (>K:ADD_FUEL_QUANTITY)

I believe the minimum you can add is 25%, so any XXX value below 65535 divided by 4 still adds 25%. Stand alone, it adds to the total aircraft fuel quantity, not to a specific tank. However, you might try playing around with the CROSS_FEED and FUEL_SELECTOR events to try to isolate a particular tank before the ADD_FUEL_QUANTITY statement. I don’t know if it will work.

In case you do not have them, the complete list of the key events (and the rest of the SDK) can be found here:
http://msdn.microsoft.com/en-us/library/cc526980.aspx

Of course, if this is just a one shot fuel set-up, there is always the drop down FS menu: Aircraft - Fuel and Payload - Change Fuel where you will be able to accomplish what you want.

There are many fuel experts in this forum, so I am sure they will add to and clarify my comments in short order.

Bob
 
Last edited:
Back
Top