• 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.

Beaver fuel selctor query

Messages
777
Country
unitedstates
greetings to all,

First off, nothing against Aerosoft and their Beaver, just happens to be the model in question.

Beavers were built with 3 tanks in the belly and this is well represented in the Aerosoft model.

Optionally they also had tip tanks and while they are visually modeled they are not functional in the sim.

I have always wanted to have functional tip tanks.

I can handle the graphics part, the gauge programming has me stumped.

Is it true that you cannot have more tank selectors than you have engines?

Also, the tip tanks drain into the front belly tank and do not directly feed the engine.

The SOP is to start on the front tank and run it down to almost empty, then switch the main selector to the center tank.

While running on the center tank you would switch another selector that would drain fuel from the tip tanks (either left, right or both) to the front tank. After the transfer you would switch back to the front tank again and repeat the process till the tips were empty.

Can this be done in FS9 and/or FSX/A?

If so I would love to have this function which ups the fuel capacity from 95 gallons to 138 gallons.

Any and all help is appreciated.

cheers,
Lane
 
How about using Doug Dawson's fuel dump gauge?
(http://www.douglassdawson.ca/)
Add it to the panel and use your fuel selector to control the fuel dump gauge.
Then you can make it drain the tip tanks while filling the front tank.

You can add fuel tanks and change their capacities by editing the aircraft.cfg.
The default C172's aircraft.cfg has comments that explain what the text does.
 
It works!!!

...and as it is my first gauge built from scratch (with the help from Doug Dawson's fuel dump gauge) I am kind of proud of it.

I would like you experts to look at my code and see if there is something wrong with it, or something that could be changed for the better.

Code:
<Gauge Name="DHC-2_tip_tank_selector" Version="1.0">
	<Image Name="tip_tank_selector_background.bmp" Luminous="Yes"/>

	<Element>
	  <Select>
	    <Value>(G:Var1)</Value>
	    <Case Value="0">
		<Image Name="handle_off.bmp" Luminous="Yes"/>
	    </Case>
	    <Case Value="1">
		<Image Name="handle_right.bmp" Luminous="Yes"/>
	    </Case>
	    <Case Value="2">
		<Image Name="handle_both.bmp" Luminous="Yes"/>
	    </Case>
	    <Case Value="3">
		<Image Name="handle_left.bmp" Luminous="Yes"/>
	    </Case>
	  </Select>
	</Element>



	<Mouse>
	     <Area Left="100" Right="300" Top="300" Bottom="400">
		<Tooltip>Off</Tooltip>
		<Cursor Type="Hand"/>
		<Click>0 (&gt;G:Var1) 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) 0 (&gt;L:RATE_TANK_TIP_LEFT,number) 0 (&gt;L:RATE_TANK_CENTER,number)</Click>
	    </Area>

	     <Area Left="300" Right="400" Top="100" Bottom="300">
		<Tooltip>Right</Tooltip>
		<Cursor Type="Hand"/>
		<Click>1 (&gt;G:Var1) 1440 (&gt;L:RATE_TANK_TIP_RIGHT,number) 0 (&gt;L:RATE_TANK_TIP_LEFT,number) -1440 (&gt;L:RATE_TANK_CENTER,number)</Click>
	    </Area>

	     <Area Left="100" Right="300" Top="0" Bottom="100">
		<Tooltip>Both</Tooltip>
		<Cursor Type="Hand"/>
		<Click>2 (&gt;G:Var1) 720 (&gt;L:RATE_TANK_TIP_RIGHT,number) 720 (&gt;L:RATE_TANK_TIP_LEFT,number) -1440 (&gt;L:RATE_TANK_CENTER,number)</Click>
	    </Area>

	     <Area Left="0" Right="100" Top="100" Bottom="300">
		<Tooltip>Left</Tooltip>
		<Cursor Type="Hand"/>
		<Click>3 (&gt;G:Var1) 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) 1440 (&gt;L:RATE_TANK_TIP_LEFT,number) -1440 (&gt;L:RATE_TANK_CENTER,number)</Click>
	    </Area>

	</Mouse>
</Gauge>

Now if I can figure out how to get the center tank to stop filling when the tips run dry it might be perfect.

cheers,
Lane
 

Attachments

  • TTS.jpg
    TTS.jpg
    191.4 KB · Views: 407
Looks good.
So the fuelflow is limited by how much the centertank can take in?
Now if I can figure out how to get the center tank to stop filling when the tips run dry it might be perfect.
Add this:
Code:
<Element>
  <Select>
    <Value>
      (A:FUEL TANK RIGHT TIP LEVEL, percent)  0 == if{ 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) (L:RATE_TANK_TIP_LEFT,number)  2 * (&gt;L:RATE_TANK_TIP_LEFT,number)  }
      (A:FUEL TANK LEFT TIP LEVEL, percent)   0 == if{ 0 (&gt;L:RATE_TANK_TIP_LEFT,number)  (L:RATE_TANK_TIP_RIGHT,number) 2 * (&gt;L:RATE_TANK_TIP_RIGHT,number) }

      (L:RATE_TANK_TIP_RIGHT,number) (L:RATE_TANK_TIP_LEFT,number) + -1 * (&gt;L:RATE_TANK_CENTER,number)
    </Value>
  </Select>
</Element>
 
Thanks for posting, Jeroen.

So the fuelflow is limited by how much the center tank can take in?

Doug's gauge treats each tank independently and continues to fill the center tank even though the tips have run dry.

It's a great gauge and I would not have been able to do this much without it.

I'll take a look at what you posted and see how it works.

Thanks again.

cheers,
Lane
 
Thanks, Jeroen.

I was not able to implement your code, or did not understand how to.

As I said, the issue is not the flow, that is controlled by the...
Code:
-1440 (&gt;L:RATE_TANK_CENTER,number)

...which fills the belly tank at 1440 pounds per hour.

The challenge is that the belly tank will continue to fill regardless of how much fuel is in the tip tank(s).

I added...
Code:
(A:FUEL TANK LEFT TIP LEVEL,percent) 0 == if{ 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) 0 (&gt;L:RATE_TANK_TIP_LEFT,number) 0 (&gt;L:RATE_TANK_CENTER,number) }
		 els{ 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) 1440 (&gt;L:RATE_TANK_TIP_LEFT,number) -1440 (&gt;L:RATE_TANK_CENTER,number) }
...to the LEFT selector position and if I select LEFT and that tank is empty, no fuel gets added to the belly tank.

However, if I select LEFT and there is fuel in that tank, it will drain down to zero and the belly tank will continue to fill up until it is full.

Evidently the if-els is only check once, on the mouse click, I had hoped it would get checked at the gauge refresh rate.

Is there any way to force that if-els to recheck?

cheers,
Lane
 
Thanks, Jeroen.

I was not able to implement your code, or did not understand how to.
In your code it first shows the opening tag for the Gauge and then the background bitmap.
Then it shows an Element section where the bitmaps for the selector are selected.

You can add my code (it is another Element section) above the first Element section and below the line with the gauge's background bitmap.

Code:
<Gauge Name="DHC-2_tip_tank_selector" Version="1.0">
	<Image Name="tip_tank_selector_background.bmp" Luminous="Yes"/>

        [COLOR="Red"]<!--HERE-->[/COLOR]

	<Element>
	  <Select>
	    <Value>(G:Var1)</Value>

Every change made by the fuel selector should always have three actions:
-Set the outgoing rate of the left tiptank
-Set the outgoing rate of the right tiptank
-Set the ingoing rate of the bellytank to be the sum of the outgoing rates of the tiptanks
(if you make the last line a calculated value instead of a hardcoded value then the fuel going out of the tiptanks will always equal the fuel going into the bellytank)

Then you must identify events that will change the behaviour of the fuelsystem.
Four events are already in your gauge: The four positions of the fuel selector.

But there are more events that the gauge must continuously monitor:
-The left tiptank runs dry
-The right tiptank runs dry
-The bellytank is filled up

You monitor these by testing the fuel level of the tank involved.
When a tiptank gets below a given value you set that tank's flowrate to 0.
When the tank is full enough you do nothing.

For the bellytank you test if the level gets above a certain value.
If it does you set both tiptanks' flowrates to 0.

At the end of the Element section you set the flowrate of the bellytank to the sum the flowrates of both tiptanks.
 
Hi,

I don't like hijacking such an interesting thread but....

I have been trying to fill the fuel tanks using this gauge but with no success.

The fuel level always seems to decrease instead of increasing!

I have used

550 (&gt;L:RATE_TANK_MAIN_LEFT, number)
and
-550 (&gt;L:RATE_TANK_MAIN_LEFT, number)

and both commands have the same result - the number of lbs of fuel decrease in the tank.

It has me confused.

What is the secret of putting fuel into a tank.

I am just filling the tank up to a certain level, not transferring fuel from another tank.

Thanks

Walter
 
OK, now we are getting somewhere.

Jeroen, I spent more time with your code and discovered a few things.

First, my initial testing was giving me confusing results and that may have been due to my plane's close proximity to a fuel trigger. :o

After repositioning my plane and testing the gauge with your code added, I am seeing good behavior, with one exception.

Everything works OK under most circumstances, the belly tank now stops filling when the tips are dry.

The only issue happens when one of the tips is dry to begin with.

For example, I set the plane up with zero fuel in the belly and the right tip, and one gallon in the left tip. When I select LEFT with my gauge the rate doubles with every refresh. In the time it takes to empty the one gallon out of the tip, 13 gallons have been added to the belly tank. Setting the gauge to refresh once per second lowered that quantity to about 2 gallons, yet introduced a lag in the graphics when selecting that is unacceptable.

I modified the first 2 lines of your code from...
Code:
      (A:FUEL TANK RIGHT TIP LEVEL, percent)  0 == if{ 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) (L:RATE_TANK_TIP_LEFT,number)  2 * (&gt;L:RATE_TANK_TIP_LEFT,number)  }
      (A:FUEL TANK LEFT TIP LEVEL, percent)   0 == if{ 0 (&gt;L:RATE_TANK_TIP_LEFT,number)  (L:RATE_TANK_TIP_RIGHT,number) 2 * (&gt;L:RATE_TANK_TIP_RIGHT,number) }

...to...
Code:
      (A:FUEL TANK RIGHT TIP LEVEL, percent)  0 == if{ 0 (&gt;L:RATE_TANK_TIP_RIGHT,number) }
      (A:FUEL TANK LEFT TIP LEVEL, percent)   0 == if{ 0 (&gt;L:RATE_TANK_TIP_LEFT,number)  }

This eliminates the rate doubling and still stops the belly from filling after the tips run dry.

I still want to test more, yet so far the only thing I have seen that could be better happens with an unbalanced load.

If I select BOTH when one tip has more fuel than the other, the fill rate drops from -1440 to -720 when the first tip runs dry.

This might be acceptable if I can't change it.

Thanks much for your help, I am quite happy with the gauge right now.

cheers,
Lane
 
550 (&gt;L:RATE_TANK_MAIN_LEFT, number)
and
-550 (&gt;L:RATE_TANK_MAIN_LEFT, number)

and both commands have the same result - the number of lbs of fuel decrease in the tank.

Negative numbers add fuel for me OK.

Maybe you can post the rest of your code?

If so, it might be a good idea to start another topic.

cheers,
Lane
 
Back
Top