]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPosition.cpp
FG_HAVE_STD_INCLUDES -> SG_HAVE_STD_INCLUDES
[flightgear.git] / src / FDM / JSBSim / FGPosition.cpp
index bc73e33f55d27230f09d285ed6cbb4f421872f5c..2a895b4c551b4403abe9e9dd173a2b55820a43b4 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  Module:       FGPosition.cpp
  Author:       Jon S. Berndt
@@ -34,9 +34,9 @@ HISTORY
 --------------------------------------------------------------------------------
 01/05/99   JSB   Created
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
     Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
     School, January 1994
@@ -49,13 +49,13 @@ COMMENTS, REFERENCES,  and NOTES
 [5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
     1982 ISBN 0-471-08936-2
  
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  ifdef FG_HAVE_STD_INCLUDES
+#  ifdef SG_HAVE_STD_INCLUDES
 #    include <cmath>
 #    include <iomanip>
 #  else
@@ -78,9 +78,12 @@ INCLUDES
 #include "FGAuxiliary.h"
 #include "FGOutput.h"
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = ID_POSITION;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 extern float globalTriNormal[3];
 extern double globalSceneryAltitude;
@@ -89,7 +92,8 @@ extern double globalSeaLevelRadius;
 FGPosition::FGPosition(FGFDMExec* fdmex) : FGModel(fdmex),
     vUVW(3),
     vVel(3),
-    vVelDot(3)
+    vVelDot(3),
+    vRunwayNormal(3)
 {
   Name = "FGPosition";
   LongitudeDot = LatitudeDot = RadiusDot = 0.0;
@@ -101,9 +105,10 @@ FGPosition::FGPosition(FGFDMExec* fdmex) : FGModel(fdmex),
   Radius         = SeaLevelRadius + h;
   RunwayRadius   = SeaLevelRadius;
   DistanceAGL    = Radius - RunwayRadius;  // Geocentric
+  vRunwayNormal(3) = -1.0;                 // Initialized for standalone mode
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 FGPosition::~FGPosition(void) {}
 
@@ -162,7 +167,7 @@ bool FGPosition:: Run(void) {
   }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGPosition::GetState(void) {
   dt = State->Getdt();