# 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FG_BI2VEL,
FG_CI2VEL,
FG_ELEVATOR_POS,
+ FG_AELEVATOR_POS,
FG_AILERON_POS,
+ FG_AAILERON_POS,
FG_RUDDER_POS,
+ FG_ARUDDER_POS,
FG_SPDBRAKE_POS,
FG_SPOILERS_POS,
FG_FLAPS_POS,
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
};
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
virtual ~FGJSBBase() {};
/// JSBSim Message structure
- struct Message {
+ typedef struct Msg {
unsigned int fdmId;
unsigned int messageId;
string text;
bool bVal;
int iVal;
double dVal;
- };
+ } Message;
///@name JSBSim Enums.
//@{
/** 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;