]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Gear.hpp
Use bool where the source and destination variable is bool.
[flightgear.git] / src / FDM / YASim / Gear.hpp
index 6e432b6ddca69390c3a38979dd93ff8f771e1ddc..435ca497301ad0a88d3bc219f58a7ee89e3287f0 100644 (file)
@@ -4,6 +4,7 @@
 namespace yasim {
 
 class RigidBody;
+struct State;
 
 // A landing gear has the following parameters:
 //
@@ -37,9 +38,12 @@ public:
     void setBrake(float brake);
     void setRotation(float rotation);
     void setExtension(float extension);
-    
+    void setCastering(bool castering);
+    void setGlobalGround(double* global_ground, float* global_vel);
+
     void getPosition(float* out);
     void getCompression(float* out);
+    void getGlobalGround(double* global_ground);
     float getSpring();
     float getDamping();
     float getStaticFriction();
@@ -47,22 +51,27 @@ public:
     float getBrake();
     float getRotation();
     float getExtension();
+    bool getCastering();
+    float getCasterAngle() { return _casterAngle; }
+    float getRollSpeed() { return _rollSpeed; }
 
     // Takes a velocity of the aircraft relative to ground, a rotation
     // vector, and a ground plane (all specified in local coordinates)
     // and make a force and point of application (i.e. ground contact)
     // available via getForce().
-    void calcForce(RigidBody* body, float* v, float* rot, float* ground);
+    void calcForce(RigidBody* body, State* s, float* v, float* rot);
 
     // Computed values: total force, weight-on-wheels (force normal to
     // ground) and compression fraction.
     void getForce(float* force, float* contact);
     float getWoW();
     float getCompressFraction();
+    float getCompressDist() { return _compressDist; }
 
 private:
     float calcFriction(float wgt, float v);
 
+    bool _castering;
     float _pos[3];
     float _cmpr[3];
     float _spring;
@@ -76,6 +85,11 @@ private:
     float _contact[3];
     float _wow;
     float _frac;
+    float _compressDist;
+    double _global_ground[4];
+    float _global_vel[3];
+    float _casterAngle;
+    float _rollSpeed;
 };
 
 }; // namespace yasim