diff --git a/src/FDM/YASim/Airplane.cpp b/src/FDM/YASim/Airplane.cpp index f63eaaa5e..50ceefefd 100644 --- a/src/FDM/YASim/Airplane.cpp +++ b/src/FDM/YASim/Airplane.cpp @@ -126,14 +126,17 @@ void Airplane::getPilotAccel(float* out) // Gravity Glue::geodUp(s->pos, out); Math::mul3(-9.8f, out, out); + Math::vmul33(s->orient, out, out); + out[0] = -out[0]; // The regular acceleration float tmp[3]; - Math::mul3(-1, s->acc, tmp); - Math::add3(tmp, out, out); - // Convert to aircraft coordinates - Math::vmul33(s->orient, out, out); + Math::vmul33(s->orient, s->acc, tmp); + tmp[1] = -tmp[1]; + tmp[2] = -tmp[2]; + + Math::add3(tmp, out, out); // FIXME: rotational & centripetal acceleration needed } diff --git a/src/FDM/YASim/YASim.cxx b/src/FDM/YASim/YASim.cxx index 24d62735d..3cfd050d0 100644 --- a/src/FDM/YASim/YASim.cxx +++ b/src/FDM/YASim/YASim.cxx @@ -448,7 +448,7 @@ void YASim::copyFromYASim() _set_Accels_CG_Body(M2FT*v[0], -M2FT*v[1], -M2FT*v[2]); _fdm->getAirplane()->getPilotAccel(v); - _set_Accels_Pilot_Body(-M2FT*v[0], M2FT*v[1], M2FT*v[2]); + _set_Accels_Pilot_Body(M2FT*v[0], M2FT*v[1], M2FT*v[2]); // There is no property for pilot G's, but I need it for a panel // instrument. Hack this in here, and REMOVE IT WHEN IT FINDS A