]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGAuxiliary.h
Andreas Gaeb: fix #222 (JSBSIm reset problems)
[flightgear.git] / src / FDM / JSBSim / models / FGAuxiliary.h
index 6420e3b975bce333e338e0dfe275ab371e489b79..8f78212455db5896300e547ded4670caa8b7c8af 100644 (file)
@@ -40,16 +40,14 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGModel.h"
-#include <FGFDMExec.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGLocation.h>
-#include "FGPropagate.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGLocation.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_AUXILIARY "$Id$"
+#define ID_AUXILIARY "$Id: FGAuxiliary.h,v 1.19 2010/11/18 12:38:06 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -101,7 +99,7 @@ CLASS DOCUMENTATION
     The radius R is calculated below in the vector vToEyePt.
 
     @author Tony Peden, Jon Berndt
-    @version $Id$
+    @version $Id: FGAuxiliary.h,v 1.19 2010/11/18 12:38:06 jberndt Exp $
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -163,7 +161,7 @@ public:
   const FGColumnVector3& GetAeroUVW    (void) const { return vAeroUVW;     }
   const FGLocation&      GetLocationVRP(void) const { return vLocationVRP; }
 
-  double GethVRP(void) const { return vLocationVRP.GetRadius() - Propagate->GetSeaLevelRadius(); }
+  double GethVRP(void) const;
   double GetAeroUVW (int idx) const { return vAeroUVW(idx); }
   double Getalpha   (void) const { return alpha;      }
   double Getbeta    (void) const { return beta;       }
@@ -172,15 +170,15 @@ public:
   double GetMagBeta (void) const { return fabs(beta); }
 
   double Getalpha   (int unit) const { if (unit == inDegrees) return alpha*radtodeg;
-                                       else cerr << "Bad units" << endl; return 0.0;}
+                                       else return BadUnits(); }
   double Getbeta    (int unit) const { if (unit == inDegrees) return beta*radtodeg;
-                                       else cerr << "Bad units" << endl; return 0.0;}
+                                       else return BadUnits(); }
   double Getadot    (int unit) const { if (unit == inDegrees) return adot*radtodeg;
-                                       else cerr << "Bad units" << endl; return 0.0;}
+                                       else return BadUnits(); }
   double Getbdot    (int unit) const { if (unit == inDegrees) return bdot*radtodeg;
-                                       else cerr << "Bad units" << endl; return 0.0;}
+                                       else return BadUnits(); }
   double GetMagBeta (int unit) const { if (unit == inDegrees) return fabs(beta)*radtodeg;
-                                       else cerr << "Bad units" << endl; return 0.0;}
+                                       else return BadUnits(); }
 
   double Getqbar          (void) const { return qbar;       }
   double GetqbarUW        (void) const { return qbarUW;     }
@@ -281,6 +279,7 @@ private:
   void CalculateRelativePosition(void);
 
   void bind(void);
+  double BadUnits(void) const;
   void Debug(int from);
 };