]> git.mxchange.org Git - flightgear.git/blob - docs-mini/README.electrical
Updated to document the new 3d positional tags that are available for
[flightgear.git] / docs-mini / README.electrical
1 Specifying and Configuring and Aircraft Electrical System
2 =========================================================
3
4 Written by Curtis L. Olson <curt@flightgear.org>
5
6 February 3, 2003 - Initial revision.
7
8
9 Introduction
10 ============
11
12 The FlightGear electrical system model is an approximation.  We don't
13 model down to the level of individual electrons, but we do try to
14 model a rich enough subset of components so that a realistic (from the
15 pilot's perspective) electrical system may be implemented.  We try to
16 model enough of the general flow so that typical electrical system
17 failures can be implimented and so that the pilot can practice
18 realistic troubleshooting techniques and learn the basic structure and
19 relationships of the real aircraft electrical system.
20
21 An electrical system can be built from 4 major components: suppliers,
22 buses, outputs, and connectors.  Suppliers are things like batteries
23 and generators.  Buses collect input from multiple suppliers and feed
24 multiple outputs.  Outputs are not strictly necessary, but are
25 included so we can name generic output types and provide a consistent
26 naming scheme to other FlightGear subsystems.  Finally connectors
27 connect a supplier to a bus, or a bus to an output, and optionally can
28 specify a switch property (either a physical switch or a circuit
29 breaker.)
30
31 At run time, the structure specified in the electrical system config
32 file is parsed and a directional graph (in the computer science sense)
33 is built.  Each frame, the current is propagated through the system,
34 starting at the suppliers, flowing through the buses, and finally to
35 the outputs.  The system follows the path of connectors laid out in
36 the config file and honors the state of any connector switch.
37
38
39 Suppliers
40 =========
41
42 A supplier entry could look like the following:
43
44   <supplier>
45     <name>Battery 1</name>
46     <prop>/systems/electrical/suppliers/battery[0]</prop>
47     <kind>battery</kind>
48     <volts>24</volts>
49     <amps>60</amps>   <!-- WAG -->
50   </supplier>
51
52 <name> can be anything you choose to call this entry.
53 <prop> is the name of a property that will be updated with the state
54        of this supplier.
55 <kind> can be "battery", "alternator", or "external".
56 <volts> specifies the volts of the source
57 <amps> specifies the amps of the source
58
59 Currently <volts> and <amps> are not really modeled in detail.  This
60 is more of a place holder for the future.
61
62 For alternators, you must additionally specify:
63
64     <rpm-source>/engines/engine[0]/rpm</rpm-source>
65
66 The value of the rpm source determines if the generator is able to
67 produce power or not.
68
69
70 Buses
71 =====
72
73 A bus entry could look like the following:
74
75   <bus>
76     <name>Essential/Cross Feed Bus</name>
77     <prop>/systems/electrical/outputs/bus-essential</prop>
78     <prop>/systems/electrical/outputs/annunciators</prop>
79     <prop>/systems/electrical/outputs/master-switch</prop>
80   </bus>
81
82 <name> is whatever you choose to call this bus
83
84 You can have an arbitrary number of <prop> entries.  Each entry is the
85 name of a property that will be updated with the value of the current
86 at that bus.  This allows you to wire devices directly to the bus but
87 does not allow you to insert a switch or circuit breaker in between.
88 See "Outputs" and "Connectors" if you want to do that.
89
90
91 Outputs
92 =======
93
94 An output entry could look like the following:
95
96   <output>
97     <name>Starter 1 Power</name>
98     <prop>/systems/electrical/outputs/starter[0]</prop>
99   </output>
100
101 An output isn't entirely unlike a bus, but it's nice conceptually to
102 have a separate entity type.  This enables us to specify a common set
103 of output property names so that other subsystems can automatically
104 work with any electrical system that follows the same conventions.  An
105 output lives on the other side of a switch, so this is how you can
106 wire in cockpit switches to model things like fuel pump power,
107 avionics master switch, or any other switch on the panel.
108
109 <name> is whatever you choose to call this bus
110
111 You can have an arbitrary number of <prop> entries.  Each entry is the
112 name of a property that will be updated with the value of the current
113 at that bus.  This allows you to wire devices directly to the bus but
114 does not allow you to insert a switch or circuit breaker in between.
115 See "Outputs" and "Connectors" if you want to do that.
116
117 Other FlightGear subsystems can monitor the property name associated
118 with the various outputs to decide how to render an instrument,
119 whether to run the fuel pump, whether to spin a gyro, or any other
120 subsystem that cares about electrical power.
121
122
123 Connectors
124 ==========
125
126 An connector entry could look like the following:
127
128   <connector>
129     <input>Alternator 1</input>
130     <output>Virtual Bus 1</output>
131     <switch>/controls/switches/master-alt</switch>
132     <initial-state>off</initial-state>  <!-- optional tag -->
133   </connector>
134
135 A connector specifies and input, and output, and any number of
136 switches that are wired in series.  In other words, all switches need
137 to be true/on in order for current to get from the input to the output
138 of the connector.
139
140 <input> specifies the <name> of the input.  Typically you would
141 specify a "supplier" or a "bus".
142
143 <output> specifies the <name> of the output.  Typically you would
144 specify a bus or an output.
145
146 You can have an arbitrary number of <switch> entries.  The switches
147 are wired in series so all of them need to be on (i.e. true) in order
148 for current to pass to the output.
149
150 Note: by default the system forces any listed switches to be true.
151 The assumption is that not every aircraft or cockpit may impliment
152 every available switch, so rather than having systems be switched off,
153 with no way to turn them on, we default to switched on.
154
155 This is a problem however with the starter switch which we want to be
156 initialized to "off".  To solve this problem you can specify
157 <initial-state>off</initial-state> or
158 <initial-state>on</initial-state> Switches default to on, so you
159 really only need to specify this tag if you want the connector's
160 switch to default to off.
161
162
163 Summary
164 =======
165
166 The electrical system has a lot of power and flexibility to model a
167 variety of electrical systems.  However, it is not yet perfect or
168 finished.  One major weakness is that it doesn't yet model degraded
169 battery or generator power, and it doesn't model the "charge" of the
170 batteries in case of a generator failure.