]> git.mxchange.org Git - flightgear.git/commitdiff
Use lower case letters instead.
authorehofman <ehofman>
Sat, 15 May 2004 12:46:25 +0000 (12:46 +0000)
committerehofman <ehofman>
Sat, 15 May 2004 12:46:25 +0000 (12:46 +0000)
src/AIModel/AIFlightPlan.cxx
src/AIModel/AIScenario.cxx

index 16ddb3daa867f1a8bb41b3407e07cd8c4613d8ad..3bde497cafb9195f68e23f40e9862ac3d5b15215 100644 (file)
@@ -46,20 +46,20 @@ FGAIFlightPlan::FGAIFlightPlan(string filename)
       return;
   }
 
-  SGPropertyNode * node = root.getNode("FLIGHTPLAN");
+  SGPropertyNode * node = root.getNode("flightplan");
   for (i = 0; i < node->nChildren(); i++) { 
      //cout << "Reading waypoint " << i << endl;        
      waypoint* wpt = new waypoint;
      waypoints.push_back( wpt );
      SGPropertyNode * wpt_node = node->getChild(i);
-     wpt->name      = wpt_node->getStringValue("NAME", "END");
-     wpt->latitude  = wpt_node->getDoubleValue("LAT", 0);
-     wpt->longitude = wpt_node->getDoubleValue("LON", 0);
-     wpt->altitude  = wpt_node->getDoubleValue("ALT", 0);
-     wpt->speed     = wpt_node->getDoubleValue("KTAS", 0);
-     wpt->crossat   = wpt_node->getDoubleValue("CROSSAT", -10000);
-     wpt->gear_down = wpt_node->getBoolValue("GEAR-DOWN", false);
-     wpt->flaps_down= wpt_node->getBoolValue("FLAPS-DOWN", false);
+     wpt->name      = wpt_node->getStringValue("name", "END");
+     wpt->latitude  = wpt_node->getDoubleValue("lat", 0);
+     wpt->longitude = wpt_node->getDoubleValue("lon", 0);
+     wpt->altitude  = wpt_node->getDoubleValue("alt", 0);
+     wpt->speed     = wpt_node->getDoubleValue("ktas", 0);
+     wpt->crossat   = wpt_node->getDoubleValue("crossat", -10000);
+     wpt->gear_down = wpt_node->getBoolValue("gear-down", false);
+     wpt->flaps_down= wpt_node->getBoolValue("flaps-down", false);
    }
 
   wpt_iterator = waypoints.begin();
@@ -163,9 +163,6 @@ double FGAIFlightPlan::getBearing(double lat, double lon, waypoint* wp){
   if (!southerly && easterly) return 90.0 - angle;
   if (southerly && !easterly) return 270.0 - angle;
   if (!southerly && !easterly) return 270.0 + angle; 
-
-  /* prevent a compiler warning */
-  return 0.0;
 }
 
 
index c714f984721d0e24b8eeb6da53d63f260410c86b..8cd66f3164f63f18193486d9e62297fa203f9a6f 100644 (file)
@@ -46,16 +46,16 @@ FGAIScenario::FGAIScenario(string filename)
       return;
   }
 
-  SGPropertyNode * node = root.getNode("SCENARIO");
+  SGPropertyNode * node = root.getNode("scenario");
   for (i = 0; i < node->nChildren(); i++) { 
      //cout << "Reading entry " << i << endl;        
      entry* en = new entry;
      entries.push_back( en );
      SGPropertyNode * entry_node = node->getChild(i);
-     en->callsign       = entry_node->getStringValue("CALLSIGN", "none");
-     en->aircraft_class = entry_node->getStringValue("CLASS", "jet_transport");
-     en->model_path     = entry_node->getStringValue("MODEL", "Models/Geometry/glider.ac");
-     en->flightplan     = entry_node->getStringValue("FLIGHTPLAN", "");
+     en->callsign       = entry_node->getStringValue("callsign", "none");
+     en->aircraft_class = entry_node->getStringValue("class", "jet_transport");
+     en->model_path     = entry_node->getStringValue("model", "Models/Geometry/glider.ac");
+     en->flightplan     = entry_node->getStringValue("flightplan", "");
    }
 
   entry_iterator = entries.begin();