diff --git a/src/Navaids/LevelDXML.cxx b/src/Navaids/LevelDXML.cxx index 73b8f78f2..a370add49 100644 --- a/src/Navaids/LevelDXML.cxx +++ b/src/Navaids/LevelDXML.cxx @@ -69,6 +69,7 @@ void NavdataVisitor::startElement(const char* name, const XMLAttributes &atts) _speed = 0.0; _altRestrict = RESTRICT_NONE; _altitude = 0.0; + _overflightWaypt = false; // default to Fly-by } else if (tag == "Approach") { _ident = atts.getValue("Name"); _waypoints.clear(); @@ -86,7 +87,7 @@ void NavdataVisitor::startElement(const char* name, const XMLAttributes &atts) _transition = new Transition(_transIdent, PROCEDURE_RUNWAY_TRANSITION, _procedure); _transWaypts.clear(); } else { - + // nothing here, we warn on unrecognized in endElement } } @@ -199,8 +200,11 @@ void NavdataVisitor::endElement(const char* name) _dmeDistance = atof(_text.c_str()); } else if (tag == "RadialtoIntercept") { _radial = atof(_text.c_str()); + } else if (tag == "Flytype") { + // values are 'Fly-by' and 'Fly-over' + _overflightWaypt = (_text == "Fly-over"); } else { - + SG_LOG(SG_IO, SG_INFO, "unrecognized Level-D XML element:" << tag); } } @@ -263,6 +267,10 @@ Waypt* NavdataVisitor::buildWaypoint(RouteBase* owner) wp->setSpeed(_speed, RESTRICT_AT); // or _BELOW? } + if (_overflightWaypt) { + wp->setFlag(WPT_OVERFLIGHT); + } + return wp; } diff --git a/src/Navaids/LevelDXML.hxx b/src/Navaids/LevelDXML.hxx index 7d61bb8f9..e3336e074 100644 --- a/src/Navaids/LevelDXML.hxx +++ b/src/Navaids/LevelDXML.hxx @@ -52,6 +52,7 @@ private: std::string _transIdent; double _longitude, _latitude, _altitude, _speed; RouteRestriction _altRestrict; + bool _overflightWaypt; double _holdRadial; // inbound hold radial, or -1 if radial is 'inbound' double _holdTD; ///< hold time (seconds) or distance (nm), based on flag below