Dave Perry wrote:
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.
I'm just wondering about manual flap systems (or non-electrically
powered flap systems)? In a separate project I implimented electric
gear retraction and electric flaps, and made them so they only worked
when the electrical system was on, but in that case I bypassed the
standard gear/flap controls. This worked since the aircraft can only be
operated with a full set of hardware controls (we aren't trying to
support every joystick or other input method under the sun.)
Curt.
--
Curtis Olson http://www.flightgear.org/~curt
HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
-------------------------------------------------------
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