In the photo referenced by gsagostinho, they are hidden by the yoke and the "retire before flying" paper. This is why this paper is exactly there! You cannot set the engine on without retiring the paper and switching the master on!
The master and gen switches are two red switches next to the keyhole. The panel in wikipedia is similar to the one we have in FlightGear:
Other examples where these switches are visible:
http://www.sunstateaviation.com/C172sp- ... hi-res.jpghttp://iho.hu/img/repules_12_03/120305_ ... 2panel.jpghttps://farm4.staticflickr.com/3059/233 ... 74b93b.jpgIn case you are not familiar with these switches:
- The master switch connects the battery to the electrical system. You need this to start the engine! Be careful: on a real c172, batteries run out very quickly!
- The GEN/alternator switch connects the alternator to the electrical system to free the battery. Use only once the engine is running!
- After the GEN is on (and not before or you'll run out of battery in no time!), you can switch AVIONICS on.
So, you could clone any of the white switches in blender and use a red texture on the new switches. Label these new switches as MasterSwitch and GenSwitch. The code in the xml is exactly the same than the code of any other switch, but linking the new two objects to the relevant properties. This would be the code for the new MasterSwitch (notice I just adapted the current code for the BeaconSwitch, lines 1579-1600 of c172p/Models/c172p.xml):
- Code: Select all
<animation>
<type>pick</type>
<object-name>MasterSwitch</object-name>
<visible>true</visible>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/engines/engine/master-bat</property>
</binding>
</action>
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip-id>master-switch</tooltip-id>
<label>Master: %s</label>
<mapping>on-off</mapping>
<property>controls/engines/engine/master-bat</property>
</binding>
</hovered>
</animation>
The code for the GEN switch is the same, but using the property controls/engines/engine/master-alt instead. You'd have to add a rotation animation for the new switches. Again, you can adapt the code for the BeaconSwitch (lines 2080-2095).
Now, regarding the simulation:
- These two switches are ON by default. This is set in the c172p-set.xml file (lines 166 and 167 in my PC) I don't like these buttons ON by default, but I guess they must be like this because flightgear pilots are (wrongly) used to this initial condition. I'd leave them ON by default for historic reasons, but experimented pilots must change the default value of these properties to false
- They are working right now as expected. The author of the xml files really coded these switches, but for some reason the modeler never included the switches in the panel. Currently, as expected:
- You cannot start the engine if the MASTER is OFF, regardless the state of the GEN
- You won't get radios if the MASTER and GEN are OFF (with engine running), or the MASTER is OFF (with the engine stopped)
I think the work to have this done is very little but the realism is greatly increased. Next step, which I believe involves lots more work, is coding the battery to have a limited capacity.
If you are interested, I can help you to code and test these buttons before you submit your modifications to the official repository. I was planning to do this myself anyway. Eu falo espanhol e estou a esquecer o meu portugues, mas ainda posso entender bem