]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navdb.cxx
Merge branch 'master' into next
[flightgear.git] / src / Navaids / navdb.cxx
index e6979ee9636fc30e2c531dc330bf766c508c1a90..f7c0cd8e1733f5502486c699ee0c08ff2ea4a3b9 100644 (file)
@@ -38,9 +38,9 @@
 #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;
 
@@ -51,8 +51,8 @@ mapRobinTypeToFGPType(int aTy)
  // 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;
@@ -66,7 +66,7 @@ static FGNavRecord* createNavFromStream(std::istream& aStream)
 {
   int rawType;
   aStream >> rawType;
-  if (aStream.eof()) {
+  if (aStream.eof() || (rawType == 99)) {
     return NULL; // happens with, eg, carrier_nav.dat
   }
   
@@ -81,7 +81,7 @@ static FGNavRecord* createNavFromStream(std::istream& aStream)
   
   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
   }