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