]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGAuxiliary.h
Updates from JSBSim, including new turbine engine model from David Culp
[flightgear.git] / src / FDM / JSBSim / FGAuxiliary.h
index 2210dd368ff39a2fc6366145e57d3d873b9a33d4..dcd6efd23c3831700c5e15479a55ca296b2c2185 100644 (file)
@@ -40,7 +40,9 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
-#include "FGMatrix.h"
+#include "FGMatrix33.h"
+#include "FGColumnVector3.h"
+#include "FGColumnVector4.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
@@ -63,13 +65,18 @@ CLASS DOCUMENTATION
 /** Encapsulates various uncategorized scheduled functions.
     @author Tony Peden, Jon Berndt
     @version $Id$
-    @see -
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGAuxiliary.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/FGAuxiliary.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Source File </a>
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+namespace JSBSim {
+
 class FGAuxiliary : public FGModel {
 public:
   /** Constructor
@@ -83,46 +90,50 @@ public:
   bool Run(void);
 
   // Use FGInitialCondition to set these speeds
-  inline float GetVcalibratedFPS(void) { return vcas; }
-  inline float GetVcalibratedKTS(void) { return vcas*FPSTOKTS; }
-  inline float GetVequivalentFPS(void) { return veas; }
-  inline float GetVequivalentKTS(void) { return veas*FPSTOKTS; }
+  inline double GetVcalibratedFPS(void) const { return vcas; }
+  inline double GetVcalibratedKTS(void) const { return vcas*fpstokts; }
+  inline double GetVequivalentFPS(void) const { return veas; }
+  inline double GetVequivalentKTS(void) const { return veas*fpstokts; }
   
-  inline FGColumnVector GetPilotAccel(void) { return vPilotAccel; }
-  inline float GetPilotAccel(int idx) { return vPilotAccel(idx); }
-  inline FGColumnVector GetNpilot(void) { return vPilotAccel*INVGRAVITY; }
-  inline float GetNpilot(int idx) { return (vPilotAccel*INVGRAVITY)(idx); }
+  inline double GetTotalTemperature(void) const { return tat; }
 
-  inline float GetEarthPositionAngle(void) { return earthPosAngle; }
+  // total pressure above is freestream total pressure for subsonic only
+  // for supersonic it is the 1D total pressure behind a normal shock
+  inline double GetTotalPressure(void) const { return pt; }
   
-  float GetHeadWind(void);
-  float GetCrossWind(void);
+  inline FGColumnVector3& GetPilotAccel(void) { return vPilotAccel; }
+  inline double GetPilotAccel(int idx) const { return vPilotAccel(idx); }
+  FGColumnVector3 GetNpilot(void) const { return vPilotAccelN; }
+  double GetNpilot(int idx) const { return vPilotAccelN(idx); }
+
+  inline double GetEarthPositionAngle(void) const { return earthPosAngle; }
   
-protected:
+  double GetHeadWind(void);
+  double GetCrossWind(void);
+  
+  void bind(void);
+  void unbind(void);
 
 private:
-  float vcas;
-  float veas;
-  float mach;
-  float qbar,rhosl,rho,p,psl,pt;
+  double vcas;
+  double veas;
+  double mach;
+  double qbar,rhosl,rho,p,psl,pt,tat,sat;
 
   // Don't add a getter for pt!
-  // pt above is freestream total pressure for subsonic only
-  // for supersonic it is the 1D total pressure behind a normal shock
-  // if a general freestream total is needed, e-mail Tony Peden
-  // (apeden@earthlink.net) or you can add it your self using the
-  // isentropic flow equations
 
-  FGColumnVector vPilotAccel;
-  
-  float earthPosAngle;
+  FGColumnVector3 vPilotAccel;
+  FGColumnVector3 vPilotAccelN;
+  FGColumnVector3 vToEyePt;
   
+  double earthPosAngle;
 
   void GetState(void);
-  void Debug(void);
+  void Debug(int from);
 };
 
+} // namespace JSBSim
+
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif