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