diff --git a/src/AIModel/AIFlightPlan.cxx b/src/AIModel/AIFlightPlan.cxx index 16ddb3daa..3bde497ca 100644 --- a/src/AIModel/AIFlightPlan.cxx +++ b/src/AIModel/AIFlightPlan.cxx @@ -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; } diff --git a/src/AIModel/AIScenario.cxx b/src/AIModel/AIScenario.cxx index c714f9847..8cd66f316 100644 --- a/src/AIModel/AIScenario.cxx +++ b/src/AIModel/AIScenario.cxx @@ -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();