On 2 Jan 2009, at 09:05, Torsten Dreyer wrote: > Nothing is wrong with this approach, but the normalized, dimensionless > approach is a more general one.
Not really my area of expertise, but I'd far prefer to use real volts, and have the aircraft electrical system define globally what it considers nominal to be to, i.e what John proposed with: For designers who prefer real volts: /systems/electrical/nominal = 12 /systems/electrical/subnominal = 7 Also, wearing my C++ refactoring hat, I do NOT want to see the electrical behaviour logic being copied into each C++ instrument class - let's create one or a couple of 'ElectricalInstrument' bases (probably one for digital instruments that are either on or off, and one for anagloue instruments that can do 'something' as supply voltage drops below nominal, down to a threshold) DigitalInstrument would have an update() hook (called by the derive instrument's update()) that did the voltage and supply checks, and checked a standard on/off state for the instrument (this would also help with writing auto-start nasal scripts for aircraft...). In the future, it could also handle current draw on the electrical bus in a standard way. I'm assuming there would be a DigitialInstrument::init() method where the derived class defines its minimum supply voltage to operate, current draw, and any other properties. I can imagine in the future defining a standby mode where some behaviour exists while the instrument is 'off', but again that's for the future. For analog instruments, we'd still define a minimum voltage, and probably a maximum clamp (assuming the instrument regulates input voltage to a reference), but within the min < supply < max range, we'd expose a 'percentage-of-nominal' value to the derived class. The gyro code could already use this to model spin up/down, and radios or anything else could use it in the future. And yes, I *am* volunteering to create this code, and re-factor instruments to use it. James ------------------------------------------------------------------------------ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel