]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGJSBBase.h
Latest JSBSim changes, including a kludge from Tony to keep the
[flightgear.git] / src / FDM / JSBSim / FGJSBBase.h
index 5561886de85ee461438cedac3ce5f5708b76ea5e..e515a91629f27d9988a1b17cc72c12e8f78f456a 100644 (file)
@@ -43,17 +43,22 @@ INCLUDES
 #  include <math.h>
 #  include <queue>
 #  include STL_STRING
-  SG_USING_STD(queue);
+
+SG_USING_STD(string);
+SG_USING_STD(queue);
+
 #else
+
+#  include <queue>
+#  include <string>
 #  if defined(sgi) && !defined(__GNUC__)
 #    include <math.h>
-#    include <queue.h>
-#    include <string.h>
 #  else
 #    include <cmath>
-#    include <queue>
-#    include <string>
 #  endif
+
+using std::string;
+using std::queue;
 #endif
 
 #ifndef M_PI 
@@ -89,6 +94,9 @@ enum eParam {
   FG_PITCHRATE,
   FG_ROLLRATE,
   FG_YAWRATE,
+  FG_AEROP,
+  FG_AEROQ,
+  FG_AEROR,
   FG_CL_SQRD,
   FG_MACH,
   FG_ALTITUDE,
@@ -128,7 +136,9 @@ enum eParam {
   FG_HTAILAREA,
   FG_VTAILAREA,
   FG_VBARH,    //horizontal tail volume 
-  FG_VBARV     //vertical tail volume 
+  FG_VBARV,     //vertical tail volume 
+  FG_GEAR_CMD,
+  FG_GEAR_POS
 };
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -157,7 +167,7 @@ public:
   virtual ~FGJSBBase() {};
 
   /// JSBSim Message structure
-  struct Message {
+  typedef struct Msg {
     unsigned int fdmId;
     unsigned int messageId;
     string text;
@@ -166,7 +176,7 @@ public:
     bool bVal;
     int  iVal;
     double dVal;
-  };
+  } Message;
 
   ///@name JSBSim Enums.
   //@{
@@ -219,43 +229,44 @@ public:
   /** Places a Message structure on the Message queue.
       @param msg pointer to a Message structure
       @return pointer to a Message structure */
-  struct Message* PutMessage(struct Message* msg);
+  Message* PutMessage(Message* msg);
   /** Creates a message with the given text and places it on the queue.
       @param text message text
       @return pointer to a Message structure */
-  struct Message* PutMessage(string text);
+  Message* PutMessage(string text);
   /** Creates a message with the given text and boolean value and places it on the queue.
       @param text message text
       @param bVal boolean value associated with the message
       @return pointer to a Message structure */
-  struct Message* PutMessage(string text, bool bVal);
+  Message* PutMessage(string text, bool bVal);
   /** Creates a message with the given text and integer value and places it on the queue.
       @param text message text
       @param iVal integer value associated with the message
       @return pointer to a Message structure */
-  struct Message* PutMessage(string text, int iVal);
+  Message* PutMessage(string text, int iVal);
   /** Creates a message with the given text and double value and places it on the queue.
       @param text message text
       @param dVal double value associated with the message
       @return pointer to a Message structure */
-  struct Message* PutMessage(string text, double dVal);
+  Message* PutMessage(string text, double dVal);
   /** Reads the message on the queue (but does not delete it).
       @return pointer to a Message structure (or NULL if no mesage) */
-  struct Message* ReadMessage(void);
+  Message* ReadMessage(void);
   /** Reads the message on the queue and removes it from the queue.
       @return pointer to a Message structure (or NULL if no mesage) */
-  struct Message* ProcessMessage(void);
+  Message* ProcessMessage(void);
   //@}
+  string GetVersion(void) {return JSBSim_version;}
 
 protected:
-  static struct Message localMsg;
+  static Message localMsg;
   
-  static queue <struct Message*> Messages;
+  static queue <Message*> Messages;
 
-  virtual void Debug(void) {};
+  virtual void Debug(int from) {};
 
   static short debug_lvl;
-  static int frame;
+  static unsigned int frame;
   static unsigned int messageId;
   
   static const double radtodeg;