]> git.mxchange.org Git - flightgear.git/commitdiff
Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence)
authorColin Douglas Howell <colin.d.howell@gmail.com>
Tue, 25 Mar 2014 08:50:21 +0000 (01:50 -0700)
committerColin Douglas Howell <colin.d.howell@gmail.com>
Tue, 25 Mar 2014 08:50:21 +0000 (01:50 -0700)
Surface::calcForce() now does reverse incidence rotation of force vector properly.

src/FDM/YASim/Surface.cpp

index db977f58a943e217f2acbb7ea9d6ecf9354bf6d4..106de68bc99a86447d5f5c5529de6f8aed7e6ac0 100644 (file)
@@ -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);