]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Model.hpp
Constant-speed props were seeking to engine speed, not prop speed.
[flightgear.git] / src / FDM / YASim / Model.hpp
index 65002cad6da26c3906ecb00e08e2ace34a88d565..a27af5c057b677de2c5bb95a8bd065bfd7441456 100644 (file)
@@ -5,6 +5,7 @@
 #include "RigidBody.hpp"
 #include "BodyEnvironment.hpp"
 #include "Vector.hpp"
+#include "Turbulence.hpp"
 
 namespace yasim {
 
@@ -25,15 +26,16 @@ public:
     RigidBody* getBody();
     Integrator* getIntegrator();
 
+    void setTurbulence(Turbulence* turb) { _turb = turb; }
+
     State* getState();
     void setState(State* s);
 
-    void resetState();
     bool isCrashed();
     void setCrashed(bool crashed);
     float getAGL();
 
-    void iterate(float dt);
+    void iterate();
 
     // Externally-managed subcomponents
     int addThruster(Thruster* t);
@@ -52,7 +54,7 @@ public:
     int numThrusters();
     Thruster* getThruster(int handle);
     void setThruster(int handle, Thruster* t);
-    void initIteration(float dt);
+    void initIteration();
     void getThrust(float* out);
 
     //
@@ -68,14 +70,17 @@ public:
     virtual void newState(State* s);
 
 private:
+    void initRotorIteration();
     void calcGearForce(Gear* g, float* v, float* rot, float* ground);
     float gearFriction(float wgt, float v, Gear* g);
     float localGround(State* s, float* out);
-    void localWind(float* pos, State* s, float* out);
+    void localWind(float* pos, State* s, float* out, float alt);
 
     Integrator _integrator;
     RigidBody _body;
 
+    Turbulence* _turb;
+
     Vector _thrusters;
     Vector _surfaces;
     Vector _rotorparts;