]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/flight.hxx
YASim airborne start-up
[flightgear.git] / src / FDM / flight.hxx
index 90859d92178275f90fc0b2b24179be9e27ab9dc5..bf1bf28bbe59a5f87cfb2aabaaabbc6ce2d69d61 100644 (file)
 #include <simgear/compiler.h>
 #include <simgear/constants.h>
 #include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
 #include <FDM/groundcache.hxx>
 
 using std::list;
 using std::vector;
 using std::string;
 
+namespace simgear {
+class BVHMaterial;
+}
+
 /**
  * A little helper class to update the track if
  * the position has changed. In the constructor, 
@@ -127,7 +132,7 @@ private:
     bool inited;
 
     // Have we bound to the property system
-    bool bound; 
+    bool bound;
 
     // periodic update management variable.  This is a scheme to run
     // the fdm with a fixed delta-t.  We control how many iteration of
@@ -186,10 +191,9 @@ private:
     double climb_rate;                // in feet per second
     double altitude_agl;
     double track;
+    double delta_loops;
 
-    double daux[16];           // auxilliary doubles
-    float  faux[16];           // auxilliary floats
-    int    iaux[16];           // auxilliary ints
+    simgear::TiedPropertyList _tiedProperties;
 
     // the ground cache object itself.
     FGGroundCache ground_cache;
@@ -367,10 +371,6 @@ public:
     inline void _set_Runway_altitude( double alt ) { runway_altitude = alt; }
     inline void _set_Climb_Rate(double rate) { climb_rate = rate; }
 
-    inline void _set_daux( int n, double value ) { daux[n] = value; }
-    inline void _set_faux( int n, float value ) { faux[n] = value; }
-    inline void _set_iaux( int n, int value ) { iaux[n] = value; }
-
 public:
   
     FGInterface();
@@ -560,6 +560,7 @@ public:
 
     inline double get_V_ground_speed() const { return v_ground_speed; }
     inline double get_V_ground_speed_kt() const { return v_ground_speed * SG_FEET_TO_METER * 3600 * SG_METER_TO_NM; }
+    inline void   set_V_ground_speed_kt(double ground_speed) { v_ground_speed = ground_speed / ( SG_FEET_TO_METER * 3600 * SG_METER_TO_NM); }
 
     inline double get_V_equiv_kts() const { return v_equiv_kts; }
 
@@ -651,11 +652,6 @@ public:
 
     inline double get_Climb_Rate() const { return climb_rate; }
 
-    // Auxilliary variables
-    inline double get_daux( int n ) const { return daux[n]; }
-    inline float  get_faux( int n ) const { return faux[n]; }
-    inline int    get_iaux( int n ) const { return iaux[n]; }
-
     // Note that currently this is the "same" value runway altitude...
     inline double get_ground_elev_ft() const { return runway_altitude; }
 
@@ -700,11 +696,11 @@ public:
     // contact point.
     bool get_agl_m(double t, const double pt[3], double max_altoff,
                    double contact[3], double normal[3], double linearVel[3],
-                   double angularVel[3], SGMaterial const*& material,
+                   double angularVel[3], simgear::BVHMaterial const*& material,
                    simgear::BVHNode::Id& id);
     bool get_agl_ft(double t, const double pt[3], double max_altoff,
                     double contact[3], double normal[3], double linearVel[3],
-                    double angularVel[3], SGMaterial const*& material,
+                    double angularVel[3], simgear::BVHMaterial const*& material,
                     simgear::BVHNode::Id& id);
     double get_groundlevel_m(double lat, double lon, double alt);
     double get_groundlevel_m(const SGGeod& geod);
@@ -715,11 +711,11 @@ public:
     // position pt.
     bool get_nearest_m(double t, const double pt[3], double maxDist,
                        double contact[3], double normal[3], double linearVel[3],
-                       double angularVel[3], SGMaterial const*& material,
+                       double angularVel[3], simgear::BVHMaterial const*& material,
                        simgear::BVHNode::Id& id);
     bool get_nearest_ft(double t, const double pt[3], double maxDist,
                         double contact[3], double normal[3],double linearVel[3],
-                        double angularVel[3], SGMaterial const*& material,
+                        double angularVel[3], simgear::BVHMaterial const*& material,
                         simgear::BVHNode::Id& id);