]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/dynamicloader.cxx
initialize release_keys array
[flightgear.git] / src / Airports / dynamicloader.cxx
index 456acc83597288492d2837e51c510658709a7e49..53027f63d52c91b71b64cbb812e53f4aa9b4a23f 100644 (file)
@@ -1,3 +1,18 @@
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+//
+
 #include "dynamicloader.hxx"
 
 FGAirportDynamicsXMLLoader::FGAirportDynamicsXMLLoader(FGAirportDynamics* dyn):
@@ -23,8 +38,11 @@ void  FGAirportDynamicsXMLLoader::startElement (const char * name, const XMLAttr
   string value;
   string gateName;
   string gateNumber;
+  string attval;
   string lat;
   string lon;
+  int holdPointType;
+  
   if (name == string("Parking"))
     {
       for (int i = 0; i < atts.size(); i++)
@@ -69,6 +87,22 @@ void  FGAirportDynamicsXMLLoader::startElement (const char * name, const XMLAttr
            taxiNode.setLatitude(atts.getValue(i));
          if (attname == string("lon"))
            taxiNode.setLongitude(atts.getValue(i));
+         if (attname == string("isOnRunway"))
+            taxiNode.setOnRunway((bool) atoi(atts.getValue(i)));
+         if (attname == string("holdPointType")) {
+            attval = atts.getValue(i);
+            if (attval==string("none")) {
+                holdPointType=0;
+            } else if (attval==string("normal")) {
+                 holdPointType=1;
+            } else if (attval==string("CAT II/III")) {
+                 holdPointType=3;
+            } else if (attval==string("PushBack")) {
+                 holdPointType=3;
+            }
+            //cerr << "Setting Holding point to " << holdPointType << endl;
+            taxiNode.setHoldPointType(holdPointType);
+          }
        }
       _dynamics->getGroundNetwork()->addNode(taxiNode);
     }
@@ -82,6 +116,8 @@ void  FGAirportDynamicsXMLLoader::startElement (const char * name, const XMLAttr
            taxiSegment.setStartNodeRef(atoi(atts.getValue(i)));
          if (attname == string("end"))
            taxiSegment.setEndNodeRef(atoi(atts.getValue(i)));
+          if (attname == string("isPushBackRoute"))
+           taxiSegment.setPushBackType((bool) atoi(atts.getValue(i)));
        }
       _dynamics->getGroundNetwork()->addSegment(taxiSegment);
     }