X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2Fnavdb.cxx;h=9cc1654a974259e52e4c88d0b70cd73afd7303ff;hb=6bf47cd248ed388e6a4dd3ffa2d00977b00b62fb;hp=5c592c1c4bbed9b6f7c178e22ef080f5f9c7e8c1;hpb=9b900e94304b95337e2731946525cde4ef377da9;p=flightgear.git diff --git a/src/Navaids/navdb.cxx b/src/Navaids/navdb.cxx index 5c592c1c4..9cc1654a9 100644 --- a/src/Navaids/navdb.cxx +++ b/src/Navaids/navdb.cxx @@ -40,7 +40,7 @@ #include "navlist.hxx" #include
#include -#include +#include #include #include #include
@@ -97,7 +97,7 @@ void alignLocaliserWithRunway(FGRunway* rwy, const string& ident, SGGeod& pos, d pos = SGGeod::fromGeodFt(newPos, pos.getElevationFt()); heading = rwy->headingDeg(); } else { - SG_LOG(SG_GENERAL, SG_DEBUG, "localizer:" << ident << ", aligning with runway " + SG_LOG(SG_NAVAID, SG_DEBUG, "localizer:" << ident << ", aligning with runway " << rwy->ident() << " exceeded heading threshold"); } } @@ -107,7 +107,7 @@ static double defaultNavRange(const string& ident, FGPositioned::Type type) // Ranges are included with the latest data format, no need to // assign our own defaults, unless the range is not set for some // reason. - SG_LOG(SG_GENERAL, SG_DEBUG, "navaid " << ident << " has no range set, using defaults"); + SG_LOG(SG_NAVAID, SG_DEBUG, "navaid " << ident << " has no range set, using defaults"); switch (type) { case FGPositioned::NDB: case FGPositioned::VOR: @@ -164,7 +164,7 @@ static PositionedID readNavFromStream(std::istream& aStream, assert(runway); pos.setElevationFt(runway->geod().getElevationFt()); } - + return cache->insertNavaid(type, string(), name, pos, 0, 0, 0, arp.first, arp.second); } @@ -183,10 +183,14 @@ static PositionedID readNavFromStream(std::istream& aStream, if (arp.second) { runway = static_cast(cache->loadById(arp.second)); assert(runway); +#if 0 + // code is disabled since it's causing some problems, see + // http://code.google.com/p/flightgear-bugs/issues/detail?id=926 if (elev_ft < 0.01) { // snap to runway elevation pos.setElevationFt(runway->geod().getElevationFt()); } +#endif } // of found runway in the DB } // of type is runway-related @@ -216,7 +220,7 @@ bool navDBInit(const SGPath& path) { sg_gzifstream in( path.str() ); if ( !in.is_open() ) { - SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() ); + SG_LOG( SG_NAVAID, SG_ALERT, "Cannot open file: " << path.str() ); return false; } @@ -238,11 +242,11 @@ bool navDBInit(const SGPath& path) bool loadCarrierNav(const SGPath& path) { - SG_LOG( SG_GENERAL, SG_INFO, "opening file: " << path.str() ); + SG_LOG( SG_NAVAID, SG_INFO, "opening file: " << path.str() ); sg_gzifstream incarrier( path.str() ); if ( !incarrier.is_open() ) { - SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() ); + SG_LOG( SG_NAVAID, SG_ALERT, "Cannot open file: " << path.str() ); return false; } @@ -256,11 +260,11 @@ bool loadCarrierNav(const SGPath& path) bool loadTacan(const SGPath& path, FGTACANList *channellist) { - SG_LOG( SG_GENERAL, SG_INFO, "opening file: " << path.str() ); + SG_LOG( SG_NAVAID, SG_INFO, "opening file: " << path.str() ); sg_gzifstream inchannel( path.str() ); if ( !inchannel.is_open() ) { - SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() ); + SG_LOG( SG_NAVAID, SG_ALERT, "Cannot open file: " << path.str() ); return false; }