]> git.mxchange.org Git - flightgear.git/commitdiff
Fix for issue 1427 (YASim fuselage's "cx" affects drag on all axes)
authorColin Douglas Howell <colin.d.howell@gmail.com>
Thu, 27 Mar 2014 09:12:11 +0000 (02:12 -0700)
committerColin Douglas Howell <colin.d.howell@gmail.com>
Thu, 27 Mar 2014 09:12:11 +0000 (02:12 -0700)
Correct Airplane::compileFuselage() so that a Fuselage's "cx"
only affects drag on the X axis.

src/FDM/YASim/Airplane.cpp

index 15fd4d683bb1d1acf3096425bf379ff9a59f4a6e..72d2b7b299dbc73080df06ec5aaf1db01f85ac4c 100644 (file)
@@ -547,9 +547,10 @@ float Airplane::compileFuselage(Fuselage* f)
         Surface* s = new Surface();
         s->setPosition(pos);
        float sideDrag = len/wid;
+        s->setXDrag(f->_cx);
         s->setYDrag(sideDrag*f->_cy);
         s->setZDrag(sideDrag*f->_cz);
-        s->setTotalDrag(scale*segWgt*f->_cx);
+        s->setTotalDrag(scale*segWgt);
         s->setInducedDrag(f->_idrag);
 
         // FIXME: fails for fuselages aligned along the Y axis