#include "navlist.hxx"
#include <Main/globals.hxx>
#include <Navaids/markerbeacon.hxx>
-#include <Airports/simple.hxx>
+#include <Airports/airport.hxx>
#include <Airports/runways.hxx>
#include <Airports/xmlloader.hxx>
#include <Main/fg_props.hxx>
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");
}
}
// 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:
assert(runway);
pos.setElevationFt(runway->geod().getElevationFt());
}
-
+
return cache->insertNavaid(type, string(), name, pos, 0, 0, 0,
arp.first, arp.second);
}
if (arp.second) {
runway = static_cast<FGRunway*>(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
{
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;
}
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;
}
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;
}