Andy Ross wrote
> Sent: 26 July 2004 18:05
> To: FlightGear developers discussions
> Subject: Re: [Flightgear-devel] Tried the Spitfire
> Vivian Meazza wrote:
> > The gotcha is that the engine stops when either tank is empty,
> > rather than when there is no fuel in any tank. I can't see a
> > way around that without tinkering with the logic of
> > fuel.nas.
> No, there's actually a feature for exactly this situation:
I was thrown at first by the comment, but on further analysis the logic is
fine, but the code doesn't seem to work correctly. When the top tank is
empty the logic requires that, if kill-when-empty is not set, for it to be
simply deselected. This isn't working: the kill-when-empty is being set
somehow, and the engine dies.
> > That said, the logic of fuel does seem a little odd. Have I got my
> > analysis of the logic wrong? Where is "kill-when-empty" set?
> By you, in the aircraft configuration. That's the property that
> tells the fuel code to kill the engine when the tank is empty.
> If you don't set the property, then the tank will only be
> deselected when it is empty.
It's being set, for tank on the second pass (I think) through the code
after the deselection pass, thus setting outofFuel and killing the engine
while there is still fuel in the lower tank.
> But, since you only *have* one selectable tank, that's basically the
> same thing; the engine is supposed to die when the bottom tank runs
> out. Am I misunderstanding the problem?
Slightly. Either, none, or both tanks can be selected to feed the engine,
but there is also an interconnecting pipe. No problem, I have done the Nasal
code: pretty straight forward. I have also posted a slightly amended
fuel.nas which works around this mysterious kill-when-empty issue.
Flightgear-devel mailing list