I just checked in a bandaid fix for propeller drag in YASim. Here's
what was happening: the Propeller class would ignore negative RPM but
still send back a torque value for turning the propeller. That torque
value would ratchet up higher and higher negative RPMs until the drag
overwhelmed the plane (though it took a while -- I had to start my
glide from 10,000 ft to see the effect).
Here's the code, with my fix:
// Euler-integrate the RPM. This doesn't need the full-on
// Runge-Kutta stuff.
float rotacc = (engTorque-propTorque)/Math::abs(_moment);
_omega += dt * rotacc;
if (_omega < 0)
_omega = 0 - _omega; // don't allow negative RPM
// FIXME: introduce proper windmilling
The last two code lines are my bandaid solution. What *should* happen
is that the propeller should keep turning at a reasonable positive
RPM, adding a constant drag to the aircraft to represent the power it
is consuming turning the crankshaft and compressing the cylinders.
You can pull the throttle to idle and still redline the tachometer if
you are flying fast enough (i.e. a dive). Any suggestions? JSBSim
does not handle windmilling properly either.
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel