]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGTrimAxis.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGTrimAxis.h
index 3aff23ee27a40af33367f6a9247f92487d253947..86537800a7adea2a0b185d6c7dd0d3be76861f7d 100644 (file)
@@ -56,7 +56,9 @@ INCLUDES
 
 #define DEFAULT_TOLERANCE 0.001
 
-const string StateNames[7]=   { "udot","vdot","wdot","qdot","pdot","rdot","hmgt" };
+const string StateNames[10]=   { "all","udot","vdot","wdot","qdot","pdot","rdot",
+                                "hmgt","nlf" 
+                              };
 const string ControlNames[14]= { "Throttle","Sideslip","Angle of Attack",
                                  "Elevator","Ailerons","Rudder",
                                  "Altitude AGL", "Pitch Angle",
@@ -69,7 +71,7 @@ const string ControlNames[14]= { "Throttle","Sideslip","Angle of Attack",
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-enum State { tUdot,tVdot,tWdot,tQdot,tPdot,tRdot,tHmgt };
+enum State { tAll,tUdot,tVdot,tWdot,tQdot,tPdot,tRdot,tHmgt,tNlf };
 enum Control { tThrottle, tBeta, tAlpha, tElevator, tAileron, tRudder, tAltAGL,
                tTheta, tPhi, tGamma, tPitchTrim, tRollTrim, tYawTrim, tHeading };
 
@@ -120,6 +122,9 @@ public:
   void SetThetaOnGround(double ff);
   void SetPhiOnGround(double ff);
   
+  inline void SetStateTarget(float target) { state_target=target; }
+  inline float GetStateTarget(void) { return state_target; }
+  
   bool initTheta(void);
   
   void AxisReport(void);
@@ -132,9 +137,11 @@ private:
 
   State   state;
   Control control;
-
-  double state_value;
-  double control_value;
+  
+  float state_target;
+  
+  float state_value;
+  float control_value;
 
   double control_min;
   double control_max;
@@ -160,7 +167,7 @@ private:
   
   double computeHmgt(void);
   
-  void Debug(void);
+  void Debug(int from);
 };
 
 #endif