1
0
Fork 0

Maik JUSTUS: "ease the rotor of the hornet if not rotating"

This commit is contained in:
mfranz 2007-06-23 06:41:17 +00:00
parent a0789e1c35
commit ee23145936

View file

@ -473,16 +473,28 @@ float Rotorpart::calculateAlpha(float* v_rel_air, float rho,
if (Math::abs(_alphaalt) >1e-6) if (Math::abs(_alphaalt) >1e-6)
div=(_centripetalforce * _len - _mass * _len * 9.81 * relgrav /_alpha0*(_alphaalt+_oppositerp->getAlphaAlt())/(2.0*_alphaalt)); div=(_centripetalforce * _len - _mass * _len * 9.81 * relgrav /_alpha0*(_alphaalt+_oppositerp->getAlphaAlt())/(2.0*_alphaalt));
if (Math::abs(div)>1e-6) if (Math::abs(div)>1e-6)
{
alpha=lift_moment/div; alpha=lift_moment/div;
}
else if(Math::abs(_alphaalt+_oppositerp->getAlphaAlt())>1e-6) else if(Math::abs(_alphaalt+_oppositerp->getAlphaAlt())>1e-6)
{ {
float div=(_centripetalforce * _len - _mass * _len * 9.81 *0.5 * relgrav)*(_alphaalt+_oppositerp->getAlphaAlt()); float div=(_centripetalforce * _len - _mass * _len * 9.81 *0.5 * relgrav)*(_alphaalt+_oppositerp->getAlphaAlt());
if (Math::abs(div)>1e-6) if (Math::abs(div)>1e-6)
{
alpha=_oppositerp->getAlphaAlt()+lift_moment/div*_alphaalt; alpha=_oppositerp->getAlphaAlt()+lift_moment/div*_alphaalt;
} }
else else
alpha=_alphaalt; alpha=_alphaalt;
} }
else
alpha=_alphaalt;
if (_omega/_omegan<0.2)
{
float frac = 0.001+_omega/_omegan*4.995;
alpha=Math::clamp(alpha,_alphamin,_alphamax);
alpha=_alphaalt*(1-frac)+frac*alpha;
}
}
else else
{ {
float div=(_centripetalforce * _len - _mass * _len * 9.81 /_alpha0); float div=(_centripetalforce * _len - _mass * _len * 9.81 /_alpha0);