X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FBodyEnvironment.hpp;h=0ff096a42a9036fe74dc08f548eaeaf6c2292868;hb=d66903e9ad63b91182ccc25d9bb82f18f8dd98b6;hp=69b4a3e4ecad8ef3f0157c84e61ab72fdf7f3127;hpb=c2e688244d6db9aa42a3f71a00f9e70fbd1f8060;p=flightgear.git diff --git a/src/FDM/YASim/BodyEnvironment.hpp b/src/FDM/YASim/BodyEnvironment.hpp index 69b4a3e4e..0ff096a42 100644 --- a/src/FDM/YASim/BodyEnvironment.hpp +++ b/src/FDM/YASim/BodyEnvironment.hpp @@ -39,9 +39,9 @@ struct State { gpos[2] = tmp[2] + pos[2]; } void posGlobalToLocal(double* gpos, float *lpos) { - lpos[0] = gpos[0] - pos[0]; - lpos[1] = gpos[1] - pos[1]; - lpos[2] = gpos[2] - pos[2]; + lpos[0] = (float)(gpos[0] - pos[0]); + lpos[1] = (float)(gpos[1] - pos[1]); + lpos[2] = (float)(gpos[2] - pos[2]); Math::vmul33(orient, lpos, lpos); } void velLocalToGlobal(float* lvel, float *gvel) { @@ -53,9 +53,9 @@ struct State { void planeGlobalToLocal(double* gplane, float *lplane) { // First the normal vector transformed to local coordinates. - lplane[0] = -gplane[0]; - lplane[1] = -gplane[1]; - lplane[2] = -gplane[2]; + lplane[0] = (float)-gplane[0]; + lplane[1] = (float)-gplane[1]; + lplane[2] = (float)-gplane[2]; Math::vmul33(orient, lplane, lplane); // Then the distance from the plane to the Aircraft's origin. @@ -89,6 +89,8 @@ public: // of body state vs. the environment can happen here (crashes, // etc...). virtual void newState(State* state) = 0; + + virtual ~BodyEnvironment() {} // #!$!?! gcc warning... }; }; // namespace yasim