In part of my learning the ins and outs of how FG really works, I found
another space I can contribute - the electrical system.
The current system has no way of handling circuit breakers or measuring a
load across a whole bus.
The system now expresses a bus like this:
<bus>
<name>...</name>
<prop>/systems/electrical/outputs/device</prop>
<prop>/systems/electrical/outputs/device2</prop>
.
.
.
</bus>
What I propose is something like this:
<bus>
<name>...</name>
<circuit>
<name>...</name>
<capacity>capacity_in_amps</capacity>
<prop>/systems/electrical/outputs/device</prop>
<prop>/systems/electrical/outputs/device2</prop>
.
.
.
</circuit>
</bus>
At this point, the bus can be organized into multiple breaker protected
circuits on a single bus. The only part of missing data is the Ampere
draw of each device.
This could be done within the electrical system definition like this:
<prop>/systems/electrical/outputs/device load=n.n</prop>
This would be the "easy" way to supply the data. However, I think it
might be better if the power draw figure was part of the instrument
definition itself. This would require 2 new tags added to the xml files
that are used to define each instrument - I'm referring to the
configurationd data found in data/Aircraft/Instruments.
The first tag would be <device-class>. This would be something like
"nav-radio" or "avionics-fan". It would be used by the load calculator to
locate the load value associated with a particular device.
The second tag would be <load> or <power-draw> or something similar. It
would be a double value containing the total draw for the device.
When the load calculator comes by, this is the number that gets added to
the total (obviously).
The idea is to allow custom devices to hold their own power draw values
independant of the "wiring". For instance, you could change out the
"stock" nav radio for some fancy unit that combines more than one function
but has a higher power draw. The device would still be of the class
"nav-radio" but would contain an updated power draw figure. The change
would only occur within the instrument panel file and would make sure that
no matter the unit installed, the power draw value would follow the device
and not the "wiring harness".
The circuit load would be calculated each time the electrical system's
update method is called. If the total load exceeds the circuit capacity
for longer than 2 seconds, the breaker would "pop" and power for that
circuit would be cut off.
If this is something that you think should be implemented, let me know and
I'll start working on the code for it.
g.
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel