prop->setManualPitch();
}
+ thruster->setGearRatio(attrf(a, "gear-ratio", 1));
+
char buf[64];
sprintf(buf, "/engines/engine[%d]", _nextEngine++);
EngRec* er = new EngRec();
_dir[0] = 1; _dir[1] = 0; _dir[2] = 0;
_variable = false;
+ _gearRatio = 1;
_prop = prop;
_eng = eng;
_eng->setMixture(_mixture);
_eng->setFuelState(_fuel);
- _prop->calc(_rho, speed, _omega, &thrust, &propTorque);
+ _prop->calc(_rho, speed, _omega * _gearRatio, &thrust, &propTorque);
_eng->calc(_pressure, _temp, _omega);
engTorque = _eng->getTorque();
_fuelFlow = _eng->getFuelFlow();
void setAdvance(float advance);
void setPropPitch(float proppitch);
void setVariableProp(float min, float max);
+ void setGearRatio(float ratio) { _gearRatio = ratio; }
virtual PropEngine* getPropEngine() { return this; }
virtual PistonEngine* getPistonEngine() { return _eng; }
bool _variable;
int _magnetos; // 0=off, 1=right, 2=left, 3=both
+ float _gearRatio;
float _advance; // control input, 0-1
float _maxOmega;
float _minOmega;