Board index FlightGear Development Aircraft Systems

Default position "OFF"

Modeling aircraft systems, like electrical stuff, hydraulics, pneumatics? Feel free to ask support.

Re: Default position "OFF"

Postby D-ECHO » Wed Apr 14, 2021 5:48 pm

Engine Startup/Shutdown

YASim jet engines have no real startup/shutdown methods. As long as they have fuel, they are running. The controlling parameter is the engine "out-of-fuel" boolean value:

/engines/engine[n]/out-of-fuel
The engine will always run as long as this value is false. Toggle the fuel supply off, and the engine stops running. Toggle the fuel supply on, and the engine is suddenly running again. YASim has no provisions for anything fancier than that.


see http://www.buckarooshangar.com/flightge ... t_jet.html
D-ECHO
 
Posts: 2453
Joined: Sat May 09, 2015 1:31 pm

Re: Default position "OFF"

Postby WoodSTokk » Wed Apr 14, 2021 6:32 pm

Jet engines in YaSim are allways running. I think the pnly way to stop it is to cut the fuel (deselect all tanks).
To model it correctly you can define your own properties and build filters or nasal to control the tank selection.
You can also look into the Citation II where i have filters and nasal to control the engines.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: Default position "OFF"

Postby havingfun » Wed Apr 14, 2021 8:36 pm

YASim jet engines have no real startup/shutdown methods. As long as they have fuel, they are running. The controlling parameter is the engine "out-of-fuel" boolean value:

I read that article, but apparently 'out-of-fuel' is an output parameter of FG that can't be set by the model (I tried and it keeps resetting to 'false'). Therefor I'm looking for a parameter that will let FG set 'out-of-fuel' to true.

I think the pnly way to stop it is to cut the fuel (deselect all tanks).

I'm not sure how, since in /controls/engines/engine/ feed_tank='-1' and in /controls/fuel/ all tanks have: to_engine='0' so if that meant something, the other engines should be off.

You can also look into the Citation II where i have filters and nasal to control the engines.

Where can I get that download? I'm usually looking in the /flightgear/ftp/Aircraft and couldn't find a CitationII.
I also think that Nasal might be beyond my capabilities, but I'll have a look.
havingfun
 
Posts: 15
Joined: Sat Nov 28, 2020 10:43 am

Re: Default position "OFF"

Postby D-ECHO » Wed Apr 14, 2021 8:39 pm

The Citation-II can be found under the directory/file name "Citation" in FGAddon (or the link you described).

If I remember correctly, out-of-fuel can be set to true by de-selecting all feeding tanks in /consumables/fuel/tank[ n ]/selected or using the Fuel and Payload dialog.
D-ECHO
 
Posts: 2453
Joined: Sat May 09, 2015 1:31 pm

Re: Default position "OFF"

Postby havingfun » Wed Apr 14, 2021 8:54 pm

If I remember correctly, out-of-fuel can be set to true by de-selecting all feeding tanks in /consumables/fuel/tank[ n ]/selected or using the Fuel and Payload dialog

Thanks, there it is. And it worked in the way that 'out-of-fuel'='true' now, but the engines are still running, only no longer reacting to the throttle. Truly strange.

That Citation is a really nice model. (now, for me there is a 'but' :) ) , but it also makes use of a Nasal code. I was hoping a simple parameter set in a .xml file would stop the engines. It worked with the lights, so I had my hopes up :) . Apparently it's not that simple with the engines...
havingfun
 
Posts: 15
Joined: Sat Nov 28, 2020 10:43 am

Re: Default position "OFF"

Postby WoodSTokk » Thu Apr 15, 2021 12:54 am

For YaSim all tanks and engines are interconnected.
If you want to stop one engine, you must deselect all tanks and this will shut down all engines.
As long as one tank is selected and it has fuel, all engines will run.
I know this is extremly bad but we must live with it.
But YaSim has also a strange behavior. If you set the throttle to 0, the engine produce no thrust and consum no fuel.
Thats crap because a running engine on idle will consum fuel and produce a little bit of thrust.
But we can use this behavior to simulate a stopped engine.
If you shut down a engine, set the throttle to 0.
The setting of the throttle lever doesnt matter, if the engine is of, YaSim receive a 0.
To accomplish this, you must separate the properties that YaSim use and the properties that you use for animations and settings.
On the Citation II look at '/controls/engines/engine/' and you will find 'throttle', 'throttle-lever', 'throttle-real', 'throttle-yasim' and 'reverser-lever'.
For the animation i use 'throttle-lever' and 'reverser-lever'.
Because of the complicated lever behavior on the Citation II a nasal script keep track of the levers so that we never have a impossible situation.
This nasal script outputs to 'throttle' and 'throttle-real'.
A property-filter convert later 'throttle-real' to 'throttle-yasim'.
This way you can also simulate idle thrust. (on the Citation II 'throttle' = 0.0, 'throttle-yasim' = 0.105).
So, as long as the engine is not running, you can set the lever where every you want, nothing will happen ('throttle-real' and 'throttle-yasim' will be 0).

You need this seperation for other values too.
'n1' and 'n2' show you always the idle values. I use my own 'fan' and 'turbine' to control the animation and display.
If the engine is running, 'n1' will be filtered to 'fan' and 'n2' will be filtered to 'turbine'. If the engine is shuted down, 'fan' and 'turbine' goes slowly down to 0 (or a value calculated out of speed and wind to simulate slow rotating blades and windmilling).
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: Default position "OFF"

Postby havingfun » Thu Apr 15, 2021 8:09 am

@WoodSTokk

thanks for the detailed description. I was wondering,, why you used all those different throttle values.
So the trick is that you always have the YASim engines running (in the background) and ignore the data (n1;n2;thrust...) when your switches say that they are not running? And you use that Nasal file to continously update throttle-lever to throttle und so on... when you want the engines to run.
That is clever. I haven't thought of that.
havingfun
 
Posts: 15
Joined: Sat Nov 28, 2020 10:43 am

Previous

Return to Systems

Who is online

Users browsing this forum: No registered users and 1 guest