• 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 XML Fuel Tank Transfer

If you can dump you should be able to load also.
In my fuelpanels i also use dsd_dump as fuelloder and fuelunloader!

Could you post your ini and xml_file.

edi

Here it is. For my Dash 8 -100 panel.
This is a three position selector which transfers fuel from right to left, then off then left to right. When set to transfer, it switches on the fuel pump from the tank being unloaded, overiding the stand alone fuel pumps usage.

Code:
<Update id="Update">
<Script>
	(A:FUEL TANK LEFT MAIN CAPACITY, gallons)
	(A:FUEL TANK LEFT MAIN QUANTITY, gallons) - 0 &lt;=
	(A:FUEL TANK RIGHT MAIN QUANTITY, gallons) 0 == ||
	(L:FUEL_TRANSFER_SWITCH, enum) -1 == &amp;&amp;
		if{
			0 (&gt;L:FUEL_TRANSFER_SWITCH, enum)
			@TRANSFER
		}
	(A:FUEL TANK RIGHT MAIN CAPACITY, gallons)
	(A:FUEL TANK RIGHT MAIN QUANTITY, gallons) - 0 &lt;=
	(A:FUEL TANK LEFT MAIN QUANTITY, gallons) 0 == ||
	(L:FUEL_TRANSFER_SWITCH, enum) 1 == &amp;&amp;
		if{
			0 (&gt;L:FUEL_TRANSFER_SWITCH, enum)
			@TRANSFER
		}
</Script>
</Update>

<Macro id="Macro" Name="TRANSFER">
<MacroValue>
	(L:FUEL_TRANSFER_SWITCH, enum) -1 ==
		if{
			-15 (&gt;L:RATE_TANK_MAIN_LEFT, number)
			15 (&gt;L:RATE_TANK_MAIN_RIGHT, number)
			1 (&gt;L:FUEL_TRANSFER, bool)
			(A:GENERAL ENG FUEL PUMP ON:1, bool) 1 ==
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP1)
				}
			(A:GENERAL ENG FUEL PUMP ON:2, bool) 0 ==
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP2)
				}
			}
	(L:FUEL_TRANSFER_SWITCH, enum) 0 ==
		if{
			0 (&gt;L:RATE_TANK_MAIN_LEFT, number)
			0 (&gt;L:RATE_TANK_MAIN_RIGHT, number)
			0 (&gt;L:FUEL_TRANSFER, bool)
			(A:GENERAL ENG FUEL PUMP ON:1, bool) 1 ==
			(L:FUEL_PUMP_SWITCH_1, bool) 0 == &amp;&amp;
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP1)
				}
			(A:GENERAL ENG FUEL PUMP ON:1, bool) 0 =
			(L:FUEL_PUMP_SWITCH_1, bool) 1 == &amp;&amp;
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP1)
				}
			(A:GENERAL ENG FUEL PUMP ON:2, bool) 1 ==
			(L:FUEL_PUMP_SWITCH_2, bool) 0 == &amp;&amp;
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP2)
				}
			(A:GENERAL ENG FUEL PUMP ON:2, bool) 0 ==
			(L:FUEL_PUMP_SWITCH_2, bool) 1 == &amp;&amp;
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP2)
				}
		}
	(L:FUEL_TRANSFER_SWITCH, enum) 1 ==
		if{
			15 (&gt;L:RATE_TANK_MAIN_LEFT, number)
			-15 (&gt;L:RATE_TANK_MAIN_RIGHT, number)
			1 (&gt;L:FUEL_TRANSFER, bool)
			(A:GENERAL ENG FUEL PUMP ON:1, bool) 0 ==
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP1)
				}
			(A:GENERAL ENG FUEL PUMP ON:2, bool) 1 ==
				if{
					(&gt;K:TOGGLE_ELECT_FUEL_PUMP2)
				}
		}
</MacroValue>
</Macro>

<MouseArea id="Transfer">
<FloatPosition>217.000,40.000</FloatPosition>
<Size>80,40</Size>
<CursorType>Hand</CursorType>
<MouseArea id="To Tank 1">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>40,40</Size>
<CursorType>LeftArrow</CursorType>
<MouseClick id="MouseClick">
	<Script>
	(L:FUEL_TRANSFER_SWITCH, enum) -1 &gt;
		if{
			(L:FUEL_TRANSFER_SWITCH, enum) -- (&gt;L:FUEL_TRANSFER_SWITCH, enum)
			@TRANSFER
			(L:FUEL_PUMP_SWITCH_1, bool) 1 ==
			(L:FUEL_PUMP_SWITCH_2, bool) 1 == ||
			if{
				1 (&gt;L:FUEL_PUMP_SWITCH_SOUND)
			}
		}
	</Script>
<ClickType>LeftSingle</ClickType>
</MouseClick>
</MouseArea>

<MouseArea id="To Tank 2">
<FloatPosition>40.000,0.000</FloatPosition>
<Size>40,40</Size>
<CursorType>RightArrow</CursorType>
<MouseClick id="MouseClick">
	<Script>
	(L:FUEL_TRANSFER_SWITCH, enum) 1 &lt;
		if{
			(L:FUEL_TRANSFER_SWITCH, enum) ++ (&gt;L:FUEL_TRANSFER_SWITCH, enum)
			@TRANSFER
			(L:FUEL_PUMP_SWITCH_1, bool) 1 ==
			(L:FUEL_PUMP_SWITCH_2, bool) 1 == ||
			if{
				1 (&gt;L:FUEL_PUMP_SWITCH_SOUND)
			}
		}
	</Script>
<ClickType>LeftSingle</ClickType>
</MouseClick>
</MouseArea>
<Tooltip id="Tooltip">
<DefaultScript>Fuel Transfer</DefaultScript>
</Tooltip>
</MouseArea>
And there's the ini file:
Code:
[Tanks]
TankMainRight=1
TankMainLeft=1

[Minimums]
PoundsFlag=1
TankMainRight=0
TankMainLeft=0

[LVars]
TankMainRight=FUEL_TRANSFER
TankMainLeft=FUEL_TRANSFER

[Rates]
TankMainRight=0
TankMainLeft=0

Just check the TRANSFER macro which is doing all the work.
The update section acts as limiter to automaticly stop and center the toggle switch to off, when one tank is empty or another gets full. The rest of the code is for the fuel pumps and indicator lights to work as they should. there is a neat bit at the end: the gauge test, which rotates the indicators needles to the maximum and back to their previous positions.

I finaly got it working as it should, but using a dsd_fuel_dump.dll by Mr. Doug Dawson, I found shipped with a payware addon on the market. It is version 2.6, and this is the only one I managed to fill tanks. The one from your DC-8 panel is dsd_fuel_dump.gau version 2.4, and it totaly empties tanks, not caring about rates either from the ini file or the (L:RATE_TANK_AUX_LEFT,number) and (L:RATE_TANK_AUX_RIGHT,number). I tried another dsd_fuel_dump.gau which is version 2.1, and this worked ok on dumping, but wasn't able to fill.

I wonder if Mr. Dawson could publish this dsd_fuel_dump.dll ver 2.6, without any tags from comercial payware. Could it be?
 
Good that you get it do work!!

I finaly got it working as it should, but using a dsd_fuel_dump.dll by Mr. Doug Dawson, I found shipped with a payware addon on the market. It is version 2.6, and this is the only one I managed to fill tanks. The one from your DC-8 panel is dsd_fuel_dump.gau version 2.4, and it totaly empties tanks, not caring about rates either from the ini file or the (L:RATE_TANK_AUX_LEFT,number) and (L:RATE_TANK_AUX_RIGHT,number). I tried another dsd_fuel_dump.gau which is version 2.1, and this worked ok on dumping, but wasn't able to fill.

Interesting! All my dsd_dump.gau from 29.07.2006!
Thanks for the info!

A small issue!
In my files i work with gallons and always recalculate the rate factor!!
I always check the tranfers to prevent a lost or win of some gallons!

In your case for example let's say the 15 are gallon.
lefttank has 10 gallons fuel.
righttank has space for 20 gallons.
By a transfer left to right you would win 5 gallons!
And vice versa:
lefttank has 50 gallon.
righttank has 10 gallon space.
By a transfer left to right you would lost 5 gallon.

So don't use 0 Gallon. Maybe use 10 Gallon or so on.
Or you have to recalculate the fuelrate by gallon. Do make it perfect.

I wonder if Mr. Dawson could publish this dsd_fuel_dump.dll ver 2.6, without any tags from comercial payware. Could it be?

That would be very nice!

edi
 
Gentlemen,

Give this one a try if you are interested. Please read through the text file, as I have changed the interface to make it simpler to use. All you do now is specify a rate in pounds per hour; set the rate back to zero to stop the dump/addition of fuel. Please treat this as a beta for now.

Doug
 

Attachments

Did you create your own fuel dump for slower dump rate? Just curious why you made your own custom fuel dump system.

DG:cool:
 
Gentlemen,

Give this one a try if you are interested. Please read through the text file, as I have changed the interface to make it simpler to use. All you do now is specify a rate in pounds per hour; set the rate back to zero to stop the dump/addition of fuel. Please treat this as a beta for now.

Doug
Thank you very much. I gave it a try today, but it didn't work...:(
I believe the ini file is no more needed, as everything now is supposed to be controlled by the rate L:vars. Anyway, I tried both, with and without the ini file and still it doesn't seem to work. The display also, shows nothing at all.
I'm with FSXA which is SP2, besides, I moved back to the 2.6 early version and it is working ok, so simconnect fault my side shouln't be.:confused:
 
Doug,

thanks for updating your gauge!
I use FS9, so i can't test it!

As posted above i did some fuelpanel programming using your gauge.
So using now pound per hour instead percent of fuel capacity per minute makes it a bit easierer!
But may i make a remark to the usage of pound per hour!
For simple dump/reload action is this ok.
But if you start programming more sophisticated fueldump -like i did-
i had to recalculate the pound per hour into pounds for one update cycle.
I had to do this also with your FS9 - version because you used
percentage of total fuel capacity each minute.

So may i make a short description how i did my programming.
While loading the plane i write the fuel quantity of each tank into a L:var.
Then i'm reading the FF of each engine and then according to the position of tankselector, fuelfeedswitches,
fuelpressure i decide from which tank the engine gets its fuel and recalculate the fuelquantity af the tank in my L:Vars.
Then i have to count for the difference of my L:Vars with the A:Fuelquantity and after that i start the update of tanks.

Code:
<!-- count DSD updaterate -->
    (P:ABSOLUTE TIME,seconds) (L:FuelM_DSD_Upd_Timer, seconds) - abs 0.5 &gt;
    if{
      (P:ABSOLUTE TIME,seconds) (&gt;L:FuelM_DSD_Upd_Timer, seconds) 
      }

<!-- dsd dump use percentage per minute -->
    60 (P:ABSOLUTE TIME,seconds) (L:FuelM_DSD_Upd_Timer, seconds) - abs / 10 / 8.5 * (&gt;L:FuelM_DSD_Upd_rate,number)
    (P:ABSOLUTE TIME,seconds) (&gt;L:FuelM_DSD_Upd_Timer, seconds) 

<!-- synchronieze tanks synchronieze tanks synchronieze tanks -->

      (L:FuelM_Status,number) 0 == 
      if{
<!-- Tank Alternate 1 -->
        -1 1 (A:FUEL TANK LEFT AUX QUANTITY,gallons) (L:FuelM_TkAlt1_Qty,gallon) - rng !
        if{
          1 (&gt;L:FuelM_DSD_Control,bool)
          100 (A:FUEL TANK LEFT AUX CAPACITY,gallon) /
          (A:FUEL TANK LEFT AUX QUANTITY,gallon) (L:FuelM_TkAlt1_Qty,gallon) - * 
          (L:FuelM_DSD_Upd_rate,number) * (&gt;L:RATE_TANK_AUX_LEFT,number)
          }

To make it more clear here an example for the DC8 - panel.

According to the AOM a DC8-50 has 9 tanks.
I wrote 9 tanks in the aircraft.cfg. 4 engine running.
FS9 uses main left tank for the 2 left engines, main right tank for the 2 right engine!
When they are empty
FS9 uses aux left tank for the 2 left engines, aux right tank for the 2 right engine and so one.


According to the AOM a DC8-50 has 9 tanks.
Every engine has 2 tanks assigned, main tank and alternate tank. Selectable by a fueltankselector.
Also 8 tanks in the wing.
Also there is one tank in the fuselage.
This means you have to transfer fuel from this tank to the main - or alternate tank in the wings.
Also you have to transfer fuel between the main- and alternate - tanks according to the AOM.
Also you have to consider which tank the engine gets its fuel from.
This all is explained in the AOM. It took me some time to understand this fuelmanagment in the real aircraft.
So you can operate my fuelpanel like the real one!
Btw this panel was planned for a freewaregroup. the group doesn't exist anymore.


So what i want to say IMHO:
for more complex fuelpanel programming it would be easier for the xlm - programmer
if the quantity of fuel in one tank could be set directly.

I want to have 500 gallon in a tank so i write 500 into the update - variable.
Your gauge will update the tankquantity and after that the variable will be set to zero!
Like in your soundgauge!

The above operation would be like this way:

Code:
      (L:FuelM_Status,number) 0 == 
      if{
<!-- Tank Alternate 1 -->
        -1 1 (A:FUEL TANK LEFT AUX QUANTITY,gallons) (L:FuelM_TkAlt1_Qty,gallon) - rng !
        if{
          (L:FuelM_TkAlt1_Qty,gallon) (&gt;L:RATE_TANK_AUX_LEFT,number)
          }


Thanks for reading!
I hope my writing is readable and understandable.

Doug, maybe you can consider this point of view.

Edi
 
Doug,
i downloaded your new version 3.0 from AVSIM. Thanks for ist.

So i tried to adapt my fuelpanel.
I had some troubles, but found a solution.
But i would like to make more clear for me what's going on.

Can you tell how often you gauge is updated a second??
Can you write a few words how you calculate the amout of fuel to dump per second??

Thanks in advance

edi
 
The FSX gauge updates every 3 frames.

The gauge measures the quantity of fuel in the tank, in gallons.
It then takes the rate you specify in pounds per hour, and converts it to gallons per second.
This figure, along with the elapsed time since the last update, allows the gauge to calculate the quantity of fuel being dumped/added on this update.
The fuel quantity is then filtered to prevent over or underfilling the tank.
The fuel quantity on hand is adjusted for the calculated fuel change and the revised value is written to the fuel tank.

Doug
 
That's what i supposed!
I changed my timing!

I'm using FS9! So your gauge works nicely in it!!

edi
I wonder why it didn't work when I tried it on FSX... guess I'll have to try it again, maybe I did something wrong...
 
Back
Top