-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGAuxiliary.h
Author: Jon Berndt
11/22/98 JSB Created
1/1/00 TP Added calcs and getters for VTAS, VCAS, VEAS, Vground, in knots
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGAUXILIARY_H
#define FGAUXILIARY_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGModel.h"
-#include "FGMatrix.h"
+#include "FGMatrix33.h"
+#include "FGColumnVector3.h"
+#include "FGColumnVector4.h"
-#define ID_AUXILIARY "$Header"
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-/*******************************************************************************
-DEFINES
-*******************************************************************************/
+#define ID_AUXILIARY "$Id$"
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Encapsulates various uncategorized scheduled functions.
+ @author Tony Peden, Jon Berndt
+ @version $Id$
+ @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
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGAuxiliary : public FGModel {
public:
+ /** Constructor
+ @param Executive a pointer to the parent executive object */
FGAuxiliary(FGFDMExec*);
- ~FGAuxiliary(void);
+ /// Destructor
+ ~FGAuxiliary();
+ /** Runs the Auxiliary routines; called by the Executive
+ @return false if no error */
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; }
+ // Use FGInitialCondition to set these speeds
+ 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 FGColumnVector GetNpilot(void) { return vPilotAccel*INVGRAVITY; }
+ 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; }
- inline float GetEarthPositionAngle(void) { return earthPosAngle; }
+ double GetHeadWind(void);
+ double GetCrossWind(void);
-
-protected:
+ void bind(void);
+ void unbind(void);
private:
- float vcas;
- float veas;
- float mach;
- float qbar,rhosl,rho,p,psl,pt;
- //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
+ double vcas;
+ double veas;
+ double mach;
+ double qbar,rhosl,rho,p,psl,pt;
+
+ // 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
+
+ FGColumnVector3 vPilotAccel;
+ FGColumnVector3 vPilotAccelN;
+ FGColumnVector3 vToEyePt;
-
-
- FGColumnVector vPilotAccel;
-
- float earthPosAngle;
+ double earthPosAngle;
void GetState(void);
+ void Debug(int from);
};
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif
+