On Fri, 2009-01-02 at 15:53 +0100, Csaba Halász wrote: > For such generic models the configuration xml should provide the the > relevant voltages of the operating characteristics (not necessarily > only min/max). > If I have a 12V instrument modeled in xml on top of the C++ code, I > still want to be able to plug it in into a 28V system and see it being > fried (or whatever the operating limits say). > Preferably such limits are private to each instrument, so shouldn't > even pollute the property tree. > > Example: > > <dme> > <name>12V dme instrument</name> > <number>0</number> > <voltages> > <minimum>7</minimum> > <maximum>15</maximum> > </voltages> > </dme> > > I can point to this piece of xml and say it models a 12V dme. I can > stick it into aircraft, and depending on the absolute voltages > provided, it just does the right thing. > > On the C++ side this is essentially what James Turner suggested with > the ElectricalInstrument/DigitalInstrument approach, but with the > important difference that the normalization factors do not come from a > global place, but from the configuration for each instrument (because > it isn't about "what the aircraft electrical system considers > nominal", it is about each instrument!). The fact that the derived dme > instrument is using normalized values *inside of itself* is okay with > me, as long as it isn't visible from the outside. > > Also, the electrical system can be modeled in nasal if preferred, it > just needs to provide real voltages to the instruments.
I'd like to throw my support behind Csaba's idea of putting this data into the instrumentation.xml file, perhaps also adding a <source> tag so we can declare which property the voltage comes from: <dme> <name>12V dme instrument</name> <number>0</number> <voltages> <minimum>7</minimum> <maximum>15</maximum> </voltages> <source>systems/electrical/outputs/avionics-volts</source> </dme> This would allow us to power multiple units from the same c/b or switch without providing duplicate outputs. Happy New Year, Ron ------------------------------------------------------------------------------ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel