1
0
Fork 0

Avoid strong oscillations at turbulence extremes.

This commit is contained in:
david 2003-06-29 21:17:21 +00:00
parent 484bab7bc8
commit c5be967fba

View file

@ -267,8 +267,7 @@ void FGAtmosphere::Turbulence(void)
vDirectiondAccelDt(eY) = 1 - 2.0*(double(rand())/double(RAND_MAX)); vDirectiondAccelDt(eY) = 1 - 2.0*(double(rand())/double(RAND_MAX));
vDirectiondAccelDt(eZ) = 1 - 2.0*(double(rand())/double(RAND_MAX)); vDirectiondAccelDt(eZ) = 1 - 2.0*(double(rand())/double(RAND_MAX));
MagnitudedAccelDt = 1 - 2.0*(double(rand())/double(RAND_MAX));
MagnitudedAccelDt = 1 - 2.0*(double(rand())/double(RAND_MAX)) - Magnitude;
MagnitudeAccel += MagnitudedAccelDt*rate*State->Getdt(); MagnitudeAccel += MagnitudedAccelDt*rate*State->Getdt();
Magnitude += MagnitudeAccel*rate*State->Getdt(); Magnitude += MagnitudeAccel*rate*State->Getdt();