]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/gnnode.cxx
Interim windows build fix
[flightgear.git] / src / Airports / gnnode.cxx
index 1f0e13d26077c6cf22632db834f76599083cd5df..84f3aac541ed6564644dad374182390e657e0b1e 100644 (file)
@@ -14,10 +14,12 @@ using namespace flightgear;
  * FGTaxiNode
  *************************************************************************/
 
-FGTaxiNode::FGTaxiNode(PositionedID aGuid, const SGGeod& pos, bool aOnRunway, int aHoldType) :
-  FGPositioned(aGuid, FGPositioned::PARKING, "", pos),
+FGTaxiNode::FGTaxiNode(int index, const SGGeod& pos, bool aOnRunway, int aHoldType) :
+  FGPositioned(TRANSIENT_ID, FGPositioned::PARKING, "", pos),
+  m_index(index),
   isOnRunway(aOnRunway),
-  holdType(aHoldType)
+  holdType(aHoldType),
+  m_isPushback(false)
 {
   
 }
@@ -33,21 +35,33 @@ void FGTaxiNode::setElevation(double val)
 
 double FGTaxiNode::getElevationFt()
 {
-  if (mPosition.getElevationFt() == 0.0) {
-    SGGeod center2 = mPosition;
+  const SGGeod& pos = geod();
+  if( pos.getElevationFt() == 0.0)
+  {
+    SGGeod center2 = pos;
     FGScenery* local_scenery = globals->get_scenery();
     center2.setElevationM(SG_MAX_ELEVATION_M);
     double elevationEnd = -100;
-    if (local_scenery->get_elevation_m( center2, elevationEnd, NULL )) {
-      
-      SGGeod newPos = mPosition;
+    if (local_scenery->get_elevation_m( center2, elevationEnd, NULL ))
+    {
+      SGGeod newPos = pos;
       newPos.setElevationM(elevationEnd);
-    // this will call modifyPosition to update mPosition
-      NavDataCache::instance()->updatePosition(guid(), newPos);
+      // this will call modifyPosition to update mPosition
+      modifyPosition(newPos);
     }
   }
   
-  return mPosition.getElevationFt();
+  return pos.getElevationFt();
+}
+
+int FGTaxiNode::getIndex() const
+{
+    return m_index;
+}
+
+void FGTaxiNode::setIsPushback()
+{
+    m_isPushback = true;
 }
 
 double FGTaxiNode::getElevationM()