]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGJSBBase.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGJSBBase.h
index 93e40fe246a8199f2631b5a7248290a61d62120a..8a6de13ca1004f32066e77c2182418d0ce05c8aa 100644 (file)
@@ -66,6 +66,17 @@ using std::queue;
 #  define M_PI SG_PI
 #endif
 
+#ifdef __FreeBSD__ // define gcvt on FreeBSD
+
+#include <stdio.h>
+
+static char *gcvt(double number, size_t ndigit, char *buf)
+{
+     sprintf(buf, "%f", number);
+     return buf;
+}
+#endif
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -103,11 +114,26 @@ enum eParam {
   FG_BI2VEL,
   FG_CI2VEL,
   FG_ELEVATOR_POS,
+  FG_AELEVATOR_POS,
+  FG_NELEVATOR_POS,
   FG_AILERON_POS,
+  FG_AAILERON_POS,
+  FG_NAILERON_POS,
+  FG_LEFT_AILERON_POS,
+  FG_ALEFT_AILERON_POS,
+  FG_NLEFT_AILERON_POS,
+  FG_RIGHT_AILERON_POS,
+  FG_ARIGHT_AILERON_POS,
+  FG_NRIGHT_AILERON_POS,
   FG_RUDDER_POS,
+  FG_ARUDDER_POS,
+  FG_NRUDDER_POS,
   FG_SPDBRAKE_POS,
+  FG_NSPDBRAKE_POS,
   FG_SPOILERS_POS,
+  FG_NSPOILERS_POS,
   FG_FLAPS_POS,
+  FG_NFLAPS_POS,
   FG_ELEVATOR_CMD,
   FG_AILERON_CMD,
   FG_RUDDER_CMD,
@@ -136,7 +162,10 @@ 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,
+  FG_HYSTPARM
 };
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -165,7 +194,7 @@ public:
   virtual ~FGJSBBase() {};
 
   /// JSBSim Message structure
-  struct Message {
+  typedef struct Msg {
     unsigned int fdmId;
     unsigned int messageId;
     string text;
@@ -174,7 +203,7 @@ public:
     bool bVal;
     int  iVal;
     double dVal;
-  };
+  } Message;
 
   ///@name JSBSim Enums.
   //@{
@@ -227,40 +256,41 @@ 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 unsigned int frame;