]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/xmlauto.hxx
James Turner:
[flightgear.git] / src / Autopilot / xmlauto.hxx
index 08f449424060542bdd0dd403f38f2a3f0bc28904..07d5dd7ced1fa62562122b191f642b467ae1b4b3 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include STL_STRING
+#include <string>
 #include <vector>
 #include <deque>
 
-SG_USING_STD(string);
-SG_USING_STD(vector);
-SG_USING_STD(deque);
+using std::string;
+using std::vector;
+using std::deque;
 
 #include <simgear/props/props.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
@@ -111,6 +111,7 @@ private:
 
     // Configuration values
     double Kp;                  // proportional gain
+    SGPropertyNode_ptr Kp_prop;
 
     double alpha;               // low pass filter weighing factor (usually 0.1)
     double beta;                // process value weighing factor for
@@ -121,10 +122,13 @@ private:
                                 // (usually 0.0)
 
     double Ti;                  // Integrator time (sec)
+    SGPropertyNode_ptr Ti_prop;
     double Td;                  // Derivator time (sec)
-
+    SGPropertyNode_ptr Td_prop;
     double u_min;               // Minimum output clamp
+    SGPropertyNode_ptr umin_prop;
     double u_max;               // Maximum output clamp
+    SGPropertyNode_ptr umax_prop;
 
     // Previous state tracking values
     double ep_n_1;              // ep[n-1]  (prop error)
@@ -158,6 +162,7 @@ private:
     // proportional component data
     bool proportional;
     double Kp;
+    SGPropertyNode_ptr Kp_prop;
     SGPropertyNode_ptr offset_prop;
     double offset_value;
 
@@ -179,7 +184,9 @@ private:
     double r_scale;             // scale reference input from property system
 
     double u_min;               // Minimum output clamp
+    SGPropertyNode_ptr umin_prop;
     double u_max;               // Maximum output clamp
+    SGPropertyNode_ptr umax_prop;
 
     
 public:
@@ -238,9 +245,15 @@ private:
     double Tf;            // Filter time [s]
     unsigned int samples; // Number of input samples to average
     double rateOfChange;  // The maximum allowable rate of change [1/s]
+    double gainFactor;
+    double output_min_clamp;
+    double output_max_clamp;
+    SGPropertyNode_ptr gain_prop;
+
     deque <double> output;
     deque <double> input;
-    enum filterTypes { exponential, doubleExponential, movingAverage, noiseSpike };
+    enum filterTypes { exponential, doubleExponential, movingAverage,
+                       noiseSpike, gain, reciprocal };
     filterTypes filterType;
 
     bool debug;