]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGTrim.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGTrim.h
index ec53d57a67ebe81a304f6454bcd516d5395150b7..105da8affa981001263d59642eb248132b3a3715 100644 (file)
 FUNCTIONAL DESCRIPTION
 --------------------------------------------------------------------------------
  
-This class takes the given set of IC's and finds the angle of attack, elevator,
-and throttle setting required to fly steady level. This is currently for in-air
-conditions only.  It is implemented using an iterative, one-axis-at-a-time 
-scheme.  
+This class takes the given set of IC's and finds the aircraft state required to
+maintain a specified flight condition.  This flight condition can be 
+steady-level with non-zero sideslip, a steady turn, a pull-up or pushover.
+On-ground conditions can be trimmed as well, but this is currently limited to
+adjusting altitude and pitch angle only. It is implemented using an iterative,
+one-axis-at-a-time scheme.  
  
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
@@ -74,7 +76,7 @@ typedef enum { tLongitudinal, tFull, tGround, tPullup,
                tCustom, tNone, tTurn 
              } TrimMode;
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 #define snprintf _snprintf
 #endif
 
@@ -107,12 +109,14 @@ CLASS DOCUMENTATION
     <li> tLongitudinal: Trim wdot with alpha, udot with thrust, qdot with elevator</li>
     <li> tFull: tLongitudinal + vdot with phi, pdot with aileron, rdot with rudder
                 and heading minus ground track (hmgt) with beta</li>
+    <li> tPullup: tLongitudinal but adjust alpha to achieve load factor input
+         with SetTargetNlf()
+
     <li> tGround: wdot with altitude, qdot with theta, and pdot with phi</li>
+    
     The remaining modes include <b>tCustom</b>, which is completely user defined and
     <b>tNone</b>.
     </ul>
-    Currently, this class cannot trim a non-1g condition and is limited to 
-    trimming for constant true airspeed in climbs and descents.
     
     Note that trims can (and do) fail for reasons that are completely outside
     the control of the trimming routine itself. The most common problem is the 
@@ -136,6 +140,10 @@ CLASS DOCUMENTATION
     fgt->ReportState();  
     @author Tony Peden
     @version $Id$
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGTrim.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Header File </a>
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGTrim.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Source File </a>
 */       
   
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -168,6 +176,8 @@ private:
   double xlo,xhi,alo,ahi;
   double targetNlf;
   int debug_axis;
+  
+  double psidot,thetadot;
 
   FGFDMExec* fdmex;
   FGInitialCondition* fgic;
@@ -188,6 +198,8 @@ private:
   void setupPullup(void);
   void setupTurn(void);
   
+  void updateRates(void);
+
   void setDebug(void);
 
 public: