X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FIntegrator.cpp;h=efb080c04f27d2f51bd957a0d627b02b25cc91dd;hb=d66903e9ad63b91182ccc25d9bb82f18f8dd98b6;hp=872f902c417c51834dacc5a2839e74ac466c4d5c;hpb=5b84ae51a54afb63effb8841ed08643bb5701aa7;p=flightgear.git diff --git a/src/FDM/YASim/Integrator.cpp b/src/FDM/YASim/Integrator.cpp index 872f902c4..efb080c04 100644 --- a/src/FDM/YASim/Integrator.cpp +++ b/src/FDM/YASim/Integrator.cpp @@ -36,7 +36,7 @@ State* Integrator::getState() // using the specified orientation. void Integrator::l2gVector(float* orient, float* v, float* out) { - Math::tmul33(_s.orient, v, out); + Math::tmul33(orient, v, out); } // Updates a position vector for a body c.g. motion with velocity v @@ -75,7 +75,8 @@ void Integrator::calcNewInterval() float dt = _dt / 4; orthonormalize(_s.orient); - for(int i=0; i<4; i++) { + int i; + for(i=0; i<4; i++) { _body->reset(); _env->calcForces(&s); @@ -124,7 +125,8 @@ void Integrator::calcNewInterval() // First off, sanify the initial orientation orthonormalize(_s.orient); - for(int i=0; icalcForces(&stmp); @@ -190,16 +193,17 @@ void Integrator::calcNewInterval() // But the space is "locally" cartesian. State derivs; float tot = 0; - for(int i=0; i