1
0
Fork 0

Merge branch 'next' of git://gitorious.org/fg/flightgear into next

This commit is contained in:
Frederic Bouvier 2011-01-03 22:47:40 +01:00
commit d70c394cda

View file

@ -456,9 +456,13 @@ void FGAirport::readTowerData(SGPropertyNode* aRoot)
SGPropertyNode* twrNode = aRoot->getChild("tower")->getChild("twr"); SGPropertyNode* twrNode = aRoot->getChild("tower")->getChild("twr");
double lat = twrNode->getDoubleValue("lat"), double lat = twrNode->getDoubleValue("lat"),
lon = twrNode->getDoubleValue("lon"), lon = twrNode->getDoubleValue("lon"),
elevM = twrNode->getDoubleValue("elev-m"); elevM = twrNode->getDoubleValue("elev-m");
// tower elevation is AGL, not AMSL. Since we don't want to depend on the
_tower_location = SGGeod::fromDegM(lon, lat, elevM); // scenery for a precise terrain elevation, we use the field elevation
// (this is also what the apt.dat code does)
double fieldElevationM = geod().getElevationM();
_tower_location = SGGeod::fromDegM(lon, lat, fieldElevationM + elevM);
} }
bool FGAirport::buildApproach(Waypt* aEnroute, STAR* aSTAR, FGRunway* aRwy, WayptVec& aRoute) bool FGAirport::buildApproach(Waypt* aEnroute, STAR* aSTAR, FGRunway* aRwy, WayptVec& aRoute)