David Megginson wrote: > Fr�d�ric Bouvier wrote: > > Reading the double value of the node 'level-gal_us' ( the offending node ), > > I have -6.2774385622042e+066 (uninitialized I guess). > > > Where this value is supposed to be initialized ? > > The property's tied to FGInterface::get_Tank1Fuel(), and you are > right, the Tank1Fuel class variable is never initialized.
This is another on the list of properties that I'd like to see removed from the C++ interface. Even ignoring the hard-coded limit of 2 tanks (violated by pretty much anything but the smallest of light planes), this is much easier to set from within the FDM rather than at the interface level, is only ever inspected from within panel XML, and is hardly a performance limitation for C++ code. Also, could the units be changed? Gallons make perfect sense for GA planes, but most jets tend to measure it by mass instead (fuel densities change appreciably over the temperature ranges jets travel through). Actually, why not just have two properties per tank: "capacity" and "fill". Capacity could store gallons or pounds, and fill would just be a fraction in the range 0-1. Code that actually cared about the exact amount in the tank* could do the math, and a "generic" fuel gauge could be made for the panel that worked irrespective of how big the tank was. Andy * Only the FDMs do, currently, and they write these properties for others -- they never read them. -- Andrew J. Ross NextBus Information Systems Senior Software Engineer Emeryville, CA [EMAIL PROTECTED] http://www.nextbus.com "Men go crazy in conflagrations. They only get better one by one." - Sting (misquoted) _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
