From: Colin Douglas Howell Date: Tue, 25 Mar 2014 08:50:21 +0000 (-0700) Subject: Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aa27b38666320b6826ad6afa102acdcdbb77f5d2;p=flightgear.git Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence) Surface::calcForce() now does reverse incidence rotation of force vector properly. --- diff --git a/src/FDM/YASim/Surface.cpp b/src/FDM/YASim/Surface.cpp index db977f58a..106de68bc 100644 --- a/src/FDM/YASim/Surface.cpp +++ b/src/FDM/YASim/Surface.cpp @@ -225,8 +225,10 @@ void Surface::calcForce(float* v, float rho, float* out, float* torque) Math::add3(lwind, out, out); // Reverse the incidence rotation to get back to surface - // coordinates. - out[2] -= incidence * out[0]; + // coordinates. Since out[] is now the force vector and is + // roughly parallel with Z, the small-angle approximation + // must change its X component. + out[0] -= incidence * out[2]; // Convert back to external coordinates Math::tmul33(_orient, out, out);