X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FCockpit%2Fhud_rwy.cxx;h=2be1525238ed305f108362535a501862316f8476;hb=fdbfd6fd0b789eecf2c532d048a75d15f8d35ad8;hp=f73718b0781baa5a6238509b85c5c7a304d81eb8;hpb=a99ea1c7b5fb0ba69810bbad9b6aca8b4cdc116b;p=flightgear.git diff --git a/src/Cockpit/hud_rwy.cxx b/src/Cockpit/hud_rwy.cxx index f73718b07..2be152523 100644 --- a/src/Cockpit/hud_rwy.cxx +++ b/src/Cockpit/hud_rwy.cxx @@ -27,10 +27,10 @@ #include #include
#include -#include #include #include #include +#include
#include @@ -59,7 +59,7 @@ runway_instr::runway_instr(const SGPropertyNode *node) : drawIA(arrowScale > 0 ? true : false), drawIAAlways(arrowScale > 0 ? node->getBoolValue("arrow_always") : false) { - SG_LOG(SG_INPUT, SG_INFO, "Done reading runway instrument " + SG_LOG(SG_INPUT, SG_BULK, "Done reading runway instrument " << node->getStringValue("name", "[unnamed]")); view[0] = 0; @@ -184,10 +184,10 @@ FGRunway* runway_instr::get_active_runway() void runway_instr::get_rwy_points(sgdVec3 *points3d) { - double alt = current_aircraft.fdm_state->get_Runway_altitude() * SG_FEET_TO_METER; + double alt = runway->geod().getElevationM(); double length = runway->lengthM() * 0.5; double width = runway->widthM() * 0.5; - double frontLat, frontLon, backLat, backLon,az, tempLat, tempLon; + double frontLat = 0.0, frontLon = 0.0, backLat = 0.0, backLon = 0.0, az = 0.0, tempLat = 0.0, tempLon = 0.0; double runwayLon = runway->geod().getLongitudeDeg(), runwayLat = runway->geod().getLatitudeDeg(); double heading = runway->headingDeg();