I would like to add a voltage check before moving the flaps or landing gear in data/Nasal/controls.nas. The proposed changes are underlined.

flapsDown = func {
   if(arg[0] == 0) { return; }
_    if(getprop("/systems/electrical/outputs/flaps") < 8.0) {return; }
# Dave Perry added a check for voltage to the flaps 3/4/06
_    if(props.globals.getNode("/sim/flaps") != nil) {
       stepProps("/controls/flight/flaps", "/sim/flaps", arg[0]);
       return;
   }
   # Hard-coded flaps movement in 3 equal steps:
   val = 0.3333334 * arg[0] + getprop("/controls/flight/flaps");
   if(val > 1) { val = 1 } elsif(val < 0) { val = 0 }
   setprop("/controls/flight/flaps", val);
}

I think even the default generic electrical system supplies voltage to the flaps. The landing gear may be more problematic as the gear could be hydrolic (and most of the electrical systems in fgfs don't supply power to the landing gear). Here is that proposed change.
gearDown = func {
_ if(getprop("/systems/electrical/outputs/landing-gear") < 8.0) {return; }
# Dave Perry added a check for voltage to the flaps 3/4/06
_    if (arg[0] < 0) {
     setprop("/controls/gear/gear-down", 0);
   } elsif (arg[0] > 0) {
     setprop("/controls/gear/gear-down", 1);
   }
}

Since the pa24-250 configs and nasal switches check for voltage for all the other electrical devices, It bothered me that I could lower the flaps and retract the gear with the master switch off.

If we model the electrical systems but the electrical devices continue to work with no power, then modeling failures becomes difficult.

Comments?
Dave Perry


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to