]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Hitch.cpp
Show YASim config error messages.
[flightgear.git] / src / FDM / YASim / Hitch.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 121486b..5681625
@@ -7,6 +7,9 @@
 
 
 #include "Hitch.hpp"
+
+using std::vector;
+
 namespace yasim {
 Hitch::Hitch(const char *name)
 {
@@ -224,12 +227,12 @@ void Hitch::setForceIsCalculatedByOther(bool b)
     _forceIsCalculatedByMaster=b;
 }
 
-const char *Hitch::getConnectedPropertyNode() const
+std::string Hitch::getConnectedPropertyNode() const
 {
     if (_towEndNode)
         return _towEndNode->getDisplayName();
     else
-        return 0;
+        return std::string("");
 }
 
 void Hitch::setConnectedPropertyNode(const char *nodename)
@@ -734,13 +737,8 @@ void Hitch::integrate (float dt)
             }
         }
     }
-    //set the _reported_tow_end_force (smoothed)
-    //smooth it a bit and store it
-    float sc=10.*dt; //100ms
-    float tmp[3];
-    Math::mul3(sc,_towEndForce,tmp);
-    Math::mul3(1.-sc,_reportTowEndForce,_reportTowEndForce);
-    Math::add3(tmp,_reportTowEndForce,_reportTowEndForce);
+    //set the _reported_tow_end_force
+    Math::set3(_towEndForce,_reportTowEndForce);
 
     if (_open) return;
     if (_winchRelSpeed==0) return;