#include "navrecord.hxx"
#include "navlist.hxx"
#include "navdb.hxx"
-#include "Main/globals.hxx"
-#include "Navaids/markerbeacon.hxx"
-#include "Airports/simple.hxx"
+#include <Main/globals.hxx>
+#include <Navaids/markerbeacon.hxx>
+#include <Airports/simple.hxx>
using std::string;
// case 1:
case 2: return FGPositioned::NDB;
case 3: return FGPositioned::VOR;
- case 4: return FGPositioned::LOC;
- case 5: return FGPositioned::ILS;
+ case 4: return FGPositioned::ILS;
+ case 5: return FGPositioned::LOC;
case 6: return FGPositioned::GS;
case 12:
case 13: return FGPositioned::DME;
{
int rawType;
aStream >> rawType;
- if (aStream.eof()) {
+ if (aStream.eof() || (rawType == 99)) {
return NULL; // happens with, eg, carrier_nav.dat
}
if ((rawType >= 7) && (rawType <= 9)) {
// marker beacons use a different run-time class now
- FGMarkerBeacon::create(rawType, name, pos);
+ FGMarkerBeaconRecord::create(rawType, name, pos);
return NULL; // not a nav-record, but that's okay
}
return NULL;
}
- FGRunway* runway = apt->getRunwayByIdent(parts[1]);
- if (!runway) {
+ if (!apt->hasRunwayWithIdent(parts[1])) {
SG_LOG(SG_GENERAL, SG_WARN, "navaid " << aName << " associated with bogus runway ID:" << parts[1]);
return NULL;
}
- return runway;
+ return apt->getRunwayByIdent(parts[1]);
}