The throttle equivalent of helicopters (collective) is typically
controlled by a lever on the left side. Unlike aircrafts, this
lever has to be pulled to increase 'collective' input. I'm not
sure if I did it the right way, but here is a working patch to
add a "throttle-reverse" property that should be set for all
helicopters.
m.
Index: bo105/bo105-yasim-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/bo105/bo105-yasim-set.xml,v
retrieving revision 1.2
diff -u -p -r1.2 bo105-yasim-set.xml
--- bo105/bo105-yasim-set.xml 18 Oct 2003 01:44:52 -0000 1.2
+++ bo105/bo105-yasim-set.xml 2 Nov 2003 11:25:46 -0000
@@ -13,10 +13,11 @@ Bo 105 simulation config.
<flight-model>yasim</flight-model>
<aero>bo105</aero>
<fuel-fraction>0.8</fuel-fraction>
+ <throttle-reverse>true</throttle-reverse>
<sound>
<audible>true</audible>
Index: bell206/bell206-yasim-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/bell206/bell206-yasim-set.xml,v
retrieving revision 1.1
diff -u -p -r1.1 bell206-yasim-set.xml
--- bell206/bell206-yasim-set.xml 18 Oct 2003 02:01:27 -0000 1.1
+++ bell206/bell206-yasim-set.xml 2 Nov 2003 11:25:46 -0000
@@ -13,10 +13,11 @@ Bell 206 JetRanger simulation config.
<flight-model>yasim</flight-model>
<aero>bell206</aero>
<fuel-fraction>0.8</fuel-fraction>
+ <throttle-reverse>true</throttle-reverse>
<sound>
<audible>true</audible>
Index: ch47/ch47-yasim-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/ch47/ch47-yasim-set.xml,v
retrieving revision 1.1
diff -u -p -r1.1 ch47-yasim-set.xml
--- ch47/ch47-yasim-set.xml 18 Oct 2003 02:01:27 -0000 1.1
+++ ch47/ch47-yasim-set.xml 2 Nov 2003 11:25:46 -0000
@@ -13,10 +13,11 @@ CH-47 Chinook simulation config.
<flight-model>yasim</flight-model>
<aero>ch47</aero>
<fuel-fraction>0.8</fuel-fraction>
+ <throttle-reverse>true</throttle-reverse>
<sound>
<audible>true</audible>
Index: as350/as350-yasim-set.xml
===================================================================
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/as350/as350-yasim-set.xml,v
retrieving revision 1.1
diff -u -p -r1.1 as350-yasim-set.xml
--- as350/as350-yasim-set.xml 18 Oct 2003 02:01:27 -0000 1.1
+++ as350/as350-yasim-set.xml 2 Nov 2003 11:25:46 -0000
@@ -13,10 +13,11 @@ Ecureuil AS 350 Helicopter simulation co
<flight-model>yasim</flight-model>
<aero>as350</aero>
<fuel-fraction>0.8</fuel-fraction>
+ <throttle-reverse>true</throttle-reverse>
<sound>
<audible>true</audible>
Index: controls.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Controls/controls.cxx,v
retrieving revision 1.8
diff -u -p -r1.8 controls.cxx
--- controls.cxx 13 May 2003 11:35:35 -0000 1.8
+++ controls.cxx 2 Nov 2003 11:19:40 -0000
@@ -207,6 +207,7 @@ FGControls::init ()
}
auto_coordination = fgGetNode("/sim/auto-coordination", true);
+ throttle_reverse = fgGetNode("/sim/throttle-reverse", false);
}
@@ -1166,14 +1167,15 @@ FGControls::set_throttle_idle( bool val
void
FGControls::set_throttle( int engine, double pos )
{
+ double p = throttle_reverse->getBoolValue() ? 1.0 - pos : pos;
if ( engine == ALL_ENGINES ) {
for ( int i = 0; i < MAX_ENGINES; i++ ) {
- throttle[i] = pos;
+ throttle[i] = p;
CLAMP( &throttle[i], 0.0, 1.0 );
}
} else {
if ( (engine >= 0) && (engine < MAX_ENGINES) ) {
- throttle[engine] = pos;
+ throttle[engine] = p;
CLAMP( &throttle[engine], 0.0, 1.0 );
}
}
Index: controls.hxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Controls/controls.hxx,v
retrieving revision 1.6
diff -u -p -r1.6 controls.hxx
--- controls.hxx 24 Sep 2003 17:20:56 -0000 1.6
+++ controls.hxx 2 Nov 2003 11:19:41 -0000
@@ -234,6 +234,7 @@ private:
SGPropertyNode * auto_coordination;
+ SGPropertyNode * throttle_reverse;
public:
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel