]> git.mxchange.org Git - flightgear.git/commitdiff
Found by inspection a bug in the generation of orientation matrices
authorandy <andy>
Thu, 21 Mar 2002 03:35:52 +0000 (03:35 +0000)
committerandy <andy>
Thu, 21 Mar 2002 03:35:52 +0000 (03:35 +0000)
for fuselage Surface objects.  If the fuselage wasn't aligned perpendicular
to the Y axis, the matrix wouldn't be orthonormal.  Since all of, perhaps,
three aircraft have ever been built this way, it's doubtful I would have
found this as a bug report. :)

src/FDM/YASim/Airplane.cpp

index c70db66719a4b8a934b4211ee577779ede666f38..3e5b689f03c3572a0a32f5413dd94db0877483e7 100644 (file)
@@ -431,6 +431,8 @@ float Airplane::compileFuselage(Fuselage* f)
         Math::unit3(fwd, x);
         y[0] = 0; y[1] = 1; y[2] = 0;
         Math::cross3(x, y, z);
+       Math::unit3(z, z);
+       Math::cross3(z, x, y);
         s->setOrientation(o);
 
         _model.addSurface(s);