From: andy Date: Thu, 21 Mar 2002 03:35:52 +0000 (+0000) Subject: Found by inspection a bug in the generation of orientation matrices X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e45cb5d0aa3b02ce351d7a03b49fb5a1e35fcc02;p=flightgear.git Found by inspection a bug in the generation of orientation matrices 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. :) --- diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index c70db6671..3e5b689f0 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -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);