On Mon, 30 Dec 2002 13:23:53 -0500 David Megginson <[EMAIL PROTECTED]> wrote:
Jon S Berndt writes:
> How are switches usually handled in the property system?
Well, here's what I am trying to do. For a flight control system (including an autopilot), there are various switch positions that affect operation, of course. I am fleshing out our FGSwitch class so that a flight control diagram can be fully implemented in JSBSim. Several types of characteristics can cause an "FCS switch" tp take on a particular setting. For instance, if the dynamic pressure is greater than some set value, a switch can be true; if the landing gear handle is down AND you have WOW for the main gear, another switch might be true; if the two just-mentioned switches are both true, then a third switch might be true (illustrating a situation where one switch depends on the state of another). In the same vein, if a hypothetical panel "pitch override switch" is activated (true), then a corresponding FCS "switch" component that depends on the panel switch will evaluate to true, and control law evaluation will reflect that.When possible, it's nice to abstract the input more. For example, lets say that you have a transponder with a rotary switch labelled - OFF - SBY - ON - ALT
Since the idea is to generalize this, I need to know only if a switch has "completed the circuit" (true), or not (false). Or, in the case of a situation where the specific aircraft in question has an autopilot rotary switch and can select (for example) OFF, Altitude, Attitude Hold, or whatever, then I would need to know which of the settings is currently selected. It seems to me that the simplest thing for generic code to parse is 0, 1, 2. OTOH, if there is a specific boolean property for each setting, that probably eases the situation very much. Whatever the case, all that is really required is that the panel designer and the control law designer communicate. I just needed to learn a little more about the property system and its handling of switches, be they rotary or boolean.
Sorry this kind of rambles ...
Jon
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
