On 5/24/07, Javky wrote:
I solved this problem with this condition:
if ( volts > node->get_volts() || node->get_volts()==0 )
I know, it's not the best, but it works (I think much more better than 24
volts everywhere and useless switches).
The correct solution is to fill the internal structures first, and then
copy all values to properties, but it is not as easy as replace the "if"
condition. ;-)
I know this isn't helpful to this specific discussion, but I would like to
point out that this original electric system model has some horrible
limitations that make it difficult to model electrical systems that are more
advanced than what you would find on a C172. In addition, it's really
difficult to use this system to accurately drive volt and ammeter type
gauges. The underlying circuit modeling just can't handle it.
So *really*, people should be moving away from this old, depricated xml
based electrical system model and instead, code up exactly what they need in
nasal. The nasal approach is a lot more straight forward, much more
flexible, more concise.
It's different though and I figured it would talk folks a little while to
adapt to the new system, which is why we didn't just immediately yank the
old code.
Long term, every one is going to be a lot better off if they code up their
electrical systems in nasal. The c172 should have an example implementation
that should be much easier to follow and understand than the xml based
example.
Regards,
Curt.
--
Curtis Olson - University of Minnesota - FlightGear Project
http://baron.flightgear.org/~curt/ http://www.humanfirst.umn.edu/
http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel