]> git.mxchange.org Git - flightgear.git/commitdiff
Corrected fix for issue 1423 (YASim miscomputes incidence rotation of force vector)
authorColin Douglas Howell <colin.d.howell@gmail.com>
Sat, 5 Apr 2014 06:05:23 +0000 (23:05 -0700)
committerTorsten Dreyer <torsten@t3r.de>
Sat, 5 Apr 2014 09:58:16 +0000 (11:58 +0200)
I got the sign wrong in my previous fix, causing the vector to be rotated the
wrong way. See my latest comments in issue 1423. Sorry about that.

src/FDM/YASim/Surface.cpp

index 2baa42baabf364a89b82083afa667d8b04c127f4..25d8da48918e7aac1fadc9f1c549d305a0f2e0ff 100644 (file)
@@ -228,7 +228,7 @@ void Surface::calcForce(float* v, float rho, float* out, float* torque)
     // 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];
+    out[0] += incidence * out[2];
 
     // Convert back to external coordinates
     Math::tmul33(_orient, out, out);