Board index FlightGear Development Aircraft Systems

Default position "OFF"

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

Default position "OFF"

Postby StuartC » Mon Nov 14, 2016 8:12 pm

When you load an aircraft, the property tree shows a numbers of systems set as on from the start such as :-

controls/hydraulic/system/electric-pump

which is on by default.

How can I make that off by default without nasal if possible.?
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby sanhozay » Mon Nov 14, 2016 9:18 pm

Have you tried using the -set.xml file?

Something like:

Code: Select all
  <controls>
    <hydraulic>
      <system>
        <electric-pump type="bool">false</electric-pump>
      </system>
    </hydraulic>
  </controls>
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Default position "OFF"

Postby wlbragg » Mon Nov 14, 2016 9:19 pm

In the set file use

Code: Select all
    <controls>
   <hydraulic>
         <system>
            <electric-pump type="bool">false</electric-pump>
         </system>
      </hydraulic>
    </controls>


Edit:

Oops, duplicated your answer, yes this works.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Default position "OFF"

Postby StuartC » Mon Nov 14, 2016 9:46 pm

Thatnks I will have a play with that.
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 8:20 pm

so far so good with this and I'm getting where I want to be, exept for this:-

<electric>
<engine>
<generator type="bool">false</generator>
</engine>
</electric>

Fine for engine 0 but what if I need to se the condition on different engines ? Tried <engine[1]> etc, but it doesn't like that.
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby Necolatis » Wed Nov 23, 2016 8:25 pm

<engine n="1">
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 8:42 pm

<electric>
<engine n="1">
<generator type="bool">false</generator>
</engine n="1">
</electric>

Still doesn't work, in fact it fails at loading the set file with it.
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby Gijs » Wed Nov 23, 2016 8:43 pm

Code: Select all
<electric>
  <engine n="0">
    <generator type="bool">false</generator>
  </engine>
  <engine n="1">
    <generator type="bool">false</generator>
  </engine>
</electric>

Note how you don't declare the type twice on the generator tags, it's the same for engine number ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 8:51 pm

Ah, right.

Final question for tonight.

controls/switches/fuel/transfer-pump[1]

This doesn't fit with the above format

Pump zero works fine with

<switches>
<fuel>
<transfer-pump type="bool">false</transfer-pump>
</fuel>
</switches>
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby sanhozay » Wed Nov 23, 2016 9:09 pm

Does this work?

Code: Select all
<switches>
  <fuel>
    <transfer-pump n="0" type="bool">false</transfer-pump>
    <transfer-pump n="1" type="bool">false</transfer-pump>
  </fuel>
</switches>
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Default position "OFF"

Postby Richard » Wed Nov 23, 2016 9:10 pm

StuartC wrote in Wed Nov 23, 2016 8:51 pm:Ah, right.
<switches>
<fuel>
<transfer-pump type="bool">false</transfer-pump>
</fuel>
</switches>

[/quote]

Code: Select all
<switches>
      <fuel>
        <transfer-pump n="0" type="bool">false</transfer-pump>
        <transfer-pump n="1" type="bool">false</transfer-pump>
      </fuel>
    </switches>


I deliberately did a n="0" as the summat/property-name[0] is the same as summat/property-name - and I think it makes the XML more readable; but it's up to you which form to use.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 9:14 pm

Fantastic, yes that works a treat.

thanks.
StuartC
 
Posts: 3175
Joined: Fri Jun 18, 2010 9:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Default position "OFF"

Postby havingfun » Wed Apr 14, 2021 3:35 pm

Just what I was looking for, as the YASim-model I'm trying to improve has the engines running.

But... whichever setting in /controls/engines/engine I change, the engine keeps on running. Be it fuel-pump='false' or master-bat='false'.
So far I changed the settings in properties (/) as a quick test, but that's probably not the issue as the values do actually change.

controls/electric/ or /controls/fuel/ don't seem to matter to this model as every value is already set to 'false'

Any ideas? Thanks.
havingfun
 
Posts: 15
Joined: Sat Nov 28, 2020 10:43 am

Re: Default position "OFF"

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

Which engine type are you modelling?

The following is assuming a piston engine driving a propeller:

Neither the fuel pump nor the master battery are absolutely required for the engine to keep running. You can try setting magnetos or mixture to 0 and I think there is a fuel cut off property, but I'm not sure of the naming for YASim.

[EDIT] Clarification
D-ECHO
 
Posts: 2458
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Default position "OFF"

Postby havingfun » Wed Apr 14, 2021 5:37 pm

Sorry, I forgot.
It is a jet engine and the model is quite basic with neither fuel nor engine nor electrical Nasal (it is the DH-106).
havingfun
 
Posts: 15
Joined: Sat Nov 28, 2020 10:43 am

Next

Return to Systems

Who is online

Users browsing this forum: No registered users and 1 guest