Hi Markus,
The xml based electrical system model is in the process of being
abandoned. It's there for backwards compatibility only. I wrote it and
realized later that it just didn't have enough capabilities to model
anything much beyond a simple single engine aircraft electrical system.
It didn't have the capability of correctly driving the panel gauges,
properly handling multiple power generation sources (at least for some
aircraft) and there were other problems I encountered when I tried to
impliment a realistic light-twin engine electrical system.
So I decided to abandon the xml based system and recommend that people
craft a nasal based electrical system for their aircraft. Electrical
systems are very aircraft specific and can often change drastically
between serial number ranges of a particular aircraft. Also, the level
of detail that a person might want to model can vary dramatically
depending on the project and the time.
So I think a nasal based system gives us much more flexibility, and the
ability to achieve correct behavior with as much detail as desired. The
old xml based data-driven system was extremely tedious to define where
as a procedural nasal based system isn't any harder to create.
Regards,
Curt.
Markus Barenhoff wrote:
hi there,
i'am currently playing with the electrical system. i'am not sure if i,ve
found a bug or if i'am using it the wrong way.
if configured the following setup:
(supplier (alternator) 115V)
|
(connector (with switch A))
|
(bus A)
|
(connector)
|
(output A)
i've noticed that the properties bound to bus A and output A are not
updated (to 0V) if i switch of switch A.
after reading the source code a little bit, i've noticed, that
properties are not always updated (they are only updated if
FGElectricalSystem::propagate() goes down the "electric tree", which
only happens if the current volts are greater than the volts in the
current FGElectricalComponent; this is not the case if, in my case,
switch A is false, because current volts is set to 0 if a switch is
false/off).
i've written a small patch (attached to this mail) which updates all the
connected properties of the buses and outputs, after updating the
FGElectricalSystem-objects.
but maybe there is a bug in my thinking and usage of the elements...
cu markus
------------------------------------------------------------------------
Index: electrical.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Systems/electrical.cxx,v
retrieving revision 1.34
diff -r1.34 electrical.cxx
515a516,533
//
// update the properties of buses and outputs
//
for ( i = 0; i < buses.size(); ++i ) {
FGElectricalBus *node = (FGElectricalBus *)buses[i];
for( j = 0; j < node->get_num_props(); ++j ) {
fgSetFloat( node->get_prop(j).c_str(),
node->get_volts() );
}
}
for ( i = 0; i < outputs.size(); ++i ) {
FGElectricalOutput *node = (FGElectricalOutput *)outputs[i];
for( j = 0; j < node->get_num_props(); ++j ) {
fgSetFloat( node->get_prop(j).c_str(),
node->get_volts() );
}
}
--
Curtis Olson http://www.flightgear.org/~curt
HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel